BTRIEVE gateway                 0001                              BTRIEVE gateway                                                                      BTRIEVE gateway                 0002                              ===============                                                                      BTRIEVE gateway                 0003                                                                                                                   BTRIEVE gateway                 0004                                Comet includes the ability to communicate with specialized                         BTRIEVE gateway                 0005                                external software routines. These interfaces are accomplished via                  BTRIEVE gateway                 0006                                Comet gateways. The BTRIEVE gateway provides an interface between                  BTRIEVE gateway                 0007                                MTB programs and the BTRIEVE file system.                                          BTRIEVE gateway                 0008                                                                                                                   BTRIEVE gateway                 0009                                BTRIEVE files are files that are standard for many network                         BTRIEVE gateway                 0010                                applications. These files are basically B-TREE or ISAM-type files                  BTRIEVE gateway                 0011                                that can be accessed via a unique index. With Comet's networking                   BTRIEVE gateway                 0012                                capabilities, Comet applications may want to access files on the                   BTRIEVE gateway                 0013                                network that are BTRIEVE files created by non-Comet applications.                  BTRIEVE gateway                 0014                                The BTRIEVE gateway supports access to these records from an MTB                   BTRIEVE gateway                 0015                                application.                                                                       BTRIEVE gateway                 0016                                                                                                                   BTRIEVE gateway                 0017                                The BTRIEVE Record Manager must be loaded into the Comet                           BTRIEVE gateway                 0018                                workstation prior to the time that the BTRIEVE gateway is opened.                  BTRIEVE gateway                 0019                                The Record Manager then exists as a TSR in memory prior to the                     BTRIEVE gateway                 0020                                time that Comet is loaded. There are a number of parameters                        BTRIEVE gateway                 0021                                relevant to the start-up, all of which are described in the                        BTRIEVE gateway                 0022                                BTRIEVE documentation.                                                             BTRIEVE gateway                 0023                                                                                                                   BTRIEVE gateway                 0024                                Note that the BTRIEVE application interface uses software                          BTRIEVE gateway                 0025                                interrupt 7BH to communicate with the Record Manager. This                         BTRIEVE gateway                 0026                                interrupt vector should be reserved for BTRIEVE.                                   BTRIEVE gateway                 0027                                                                                                                   BTRIEVE gateway                 0028                                Once the Record Manager is loaded, the following operation codes                   BTRIEVE gateway                 0029                                are available:                                                                     BTRIEVE gateway                 0030                                                                                                                   BTRIEVE gateway                 0031                                Code    Meaning                                                                    BTRIEVE gateway                 0032                                ====    =======                                                                    BTRIEVE gateway                 0033                                0       OPEN                                                                       BTRIEVE gateway                 0034                                1       CLOSE                                                                      BTRIEVE gateway                 0035                                2       INSERT                                                                     BTRIEVE gateway                 0036                                3       UPDATE                                                                     BTRIEVE gateway                 0037                                4       DELETE                                                                     BTRIEVE gateway                 0038                                5       GET EQUAL                                                                  BTRIEVE gateway                 0039                                6       GET NEXT                                                                   BTRIEVE gateway                 0040                                7       GET PREVIOUS                                                               BTRIEVE gateway                 0041                                8       GET GREATER                                                                BTRIEVE gateway                 0042                                9       GET GREATER OR EQUAL                                                       BTRIEVE gateway                 0043                                10      GET LESS THAN                                                              BTRIEVE gateway                 0044                                11      GET LESS THAN OR EQUAL                                                     BTRIEVE gateway                 0045                                12      GET FIRST                                                                  BTRIEVE gateway                 0046                                13      GET LAST                                                                   BTRIEVE gateway                 0047                                14      CREATE                                                                     BTRIEVE gateway                 0048                                15      STAT                                                                       BTRIEVE gateway                 0049                                16      EXTEND                                                                     BTRIEVE gateway                 0050                                17      SET DIRECTORY                                                              BTRIEVE gateway                 0051                                18      GET DIRECTORY                                                              BTRIEVE gateway                 0052                                19      BEGIN TRANSACTION                                                          BTRIEVE gateway                 0053                                20      END TRANSACTION                                                            BTRIEVE gateway                 0054                                21      ABORT TRANSACTION                                                          BTRIEVE gateway                 0055                                22      GET POSITION                                                               BTRIEVE gateway                 0056                                23      GET DIRECT                                                                 BTRIEVE gateway                 0057                                24      STEP NEXT                                                                  BTRIEVE gateway                 0058                                25      STOP                                                                       BTRIEVE gateway                 0059                                26      VERSION                                                                    BTRIEVE gateway                 0060                                27      UNLOCK                                                                     BTRIEVE gateway                 0061                                28      RESET                                                                      BTRIEVE gateway                 0062                                29      SET OWNER                                                                  BTRIEVE gateway                 0063                                30      CLEAR OWNER                                                                BTRIEVE gateway                 0064                                31      CREATE SUPPLEMENTAL INDEX                                                  BTRIEVE gateway                 0065                                32      DROP SUPPLEMENTAL INDEX                                                    BTRIEVE gateway                 0066                                33      STEP FIRST                                                                 BTRIEVE gateway                 0067                                34      STEP LAST                                                                  BTRIEVE gateway                 0068                                35      STEP PREVIOUS                                                              BTRIEVE gateway                 0069                                                                                                                   BTRIEVE gateway                 0070                                The BTRIEVE Record Manager returns a status value after each                       BTRIEVE gateway                 0071                                operation an application performs. A value of 0 indicates that                     BTRIEVE gateway                 0072                                the operations was successful. The possible non-zero status codes                  BTRIEVE gateway                 0073                                that the Record Manager returns are described in the BTRIEVE                       BTRIEVE gateway                 0074                                documentation, and are too lengthy to list here.                                   BTRIEVE gateway                 0075                                                                                                                   BTRIEVE gateway                 0076                                Each BTRIEVE operation expects certain parameters to be supplied,                  BTRIEVE gateway                 0077                                and returns certain expected values. See the BTRIEVE                               BTRIEVE gateway                 0078                                documentation for the expected and returned values for each                        BTRIEVE gateway                 0079                                operation.                                                                         BTRIEVE gateway                 0080                                                                                                                   BTRIEVE gateway                 0081                                The BTRIEVE gateway expects the following parameters from an MTB                   BTRIEVE gateway                 0082                                applications:                                                                      BTRIEVE gateway                 0083                                                                                                                   BTRIEVE gateway                 0084                                Data item    Length    Description                                                 BTRIEVE gateway                 0085                                =================================================================                  BTRIEVE gateway                 0086                                                                                                                   BTRIEVE gateway                 0087                                OPCODE       4.0       One of the codes from above                                 BTRIEVE gateway                 0088                                                                                                                   BTRIEVE gateway                 0089                                DATELEN      4.0       Length of the data buffer                                   BTRIEVE gateway                 0090                                                                                                                   BTRIEVE gateway                 0091                                KEYNUM       4.0       Which index you want to use                                 BTRIEVE gateway                 0092                                                                                                                   BTRIEVE gateway                 0093                                STATUS       4.0       Returned after an operation                                 BTRIEVE gateway                 0094                                                                                                                   BTRIEVE gateway                 0095                                FCB$         128       Returned by BTRIEVE after an OPEN. Must be                  BTRIEVE gateway                 0096                                                       used as supplied in all subsequent                          BTRIEVE gateway                 0097                                                       operations.                                                 BTRIEVE gateway                 0098                                                                                                                   BTRIEVE gateway                 0099                                DATA$        xxx       Data to be written/read from/to a BTRIEVE                   BTRIEVE gateway                 0100                                                       file must be placed in the user's buffer                    BTRIEVE gateway                 0101                                                       with a WRITE or READ using a FORMAT                         BTRIEVE gateway                 0102                                                       statement to the gateway. The maximum                       BTRIEVE gateway                 0103                                                       buffer size is 1024 made up of variables                    BTRIEVE gateway                 0104                                                       of 254 bytes maximum.                                       BTRIEVE gateway                 0105                                                                                                                   BTRIEVE gateway                 0106                                KEY$         xxx       The BTRIEVE key                                             BTRIEVE gateway                 0107                                                                                                                   BTRIEVE gateway                 0108                                The parameters listed above must be supplied to the gateway by a                   BTRIEVE gateway                 0109                                PRINT followed by a variable list. The syntax of the PRINT                         BTRIEVE gateway                 0110                                statement is:                                                                      BTRIEVE gateway                 0111                                                                                                                   BTRIEVE gateway                 0112                                   PRINT (lun) OPCODE;DATALEN;KEYNUM;KEY$;FCB$;STATUS                              BTRIEVE gateway                 0113                                                                                                                   BTRIEVE gateway                 0114                                where (lun) corresponds to the lun of the opened gateway. You                      BTRIEVE gateway                 0115                                will note that the actual data is not included in the PRINT list                   BTRIEVE gateway                 0116                                above. This is because BTRIEVE access requires a separate segment                  BTRIEVE gateway                 0117                                of memory to be used for the data. Under MTB, this data segment                    BTRIEVE gateway                 0118                                is the user's buffer contained in the partition. Therefore, prior                  BTRIEVE gateway                 0119                                o each PRINT through the gateway to write data to the BTRIEVE                      BTRIEVE gateway                 0120                                file, the data must be written to the user's buffer. This is                       BTRIEVE gateway                 0121                                accomplished by an MTB formatted WRITE of the data to the lun                      BTRIEVE gateway                 0122                                opened as the gateway. This WRITE places the data in the user's                    BTRIEVE gateway                 0123                                buffer. The next PRINT to the gateway with a OPCODE for WRITE                      BTRIEVE gateway                 0124                                will take the data from the user's buffer and write it to the                      BTRIEVE gateway                 0125                                BTRIEVE file.                                                                      BTRIEVE gateway                 0126                                                                                                                   BTRIEVE gateway                 0127                                In the same manner, following each PRINT to the gateway with an                    BTRIEVE gateway                 0128                                OPCODE for READ, the data from the BTRIEVE file must be read from                  BTRIEVE gateway                 0129                                the user's buffer. This is accomplished by an MTB formatted READ                   BTRIEVE gateway                 0130                                of the lun opened as the gateway. The data will be moved from the                  BTRIEVE gateway                 0131                                user's buffer to the data variables specified in the READ format.                  BTRIEVE gateway                 0132                                                                                                                   BTRIEVE gateway                 0133                                There are several different OPCODES that provide variants to the                   BTRIEVE gateway                 0134                                standard READ or WRITE. Note: PRINT with a list is always used to                  BTRIEVE gateway                 0135                                supply the BTRIEVE operation to the gateway. READs and WRITEs of                   BTRIEVE gateway                 0136                                data to the gateway should always be done with a FORMAT                            BTRIEVE gateway                 0137                                statement.                                                                         BTRIEVE gateway                 0138                                                                                                                   BTRIEVE gateway                 0139                              Example:                                                                             BTRIEVE gateway                 0140                                                                                                                   BTRIEVE gateway                 0141                                The following example shows how to read and write from the                         BTRIEVE gateway                 0142                                BTRIEVE gateway.                                                                   BTRIEVE gateway                 0143                                                                                                                   BTRIEVE gateway                 0144                                4100    CLOSE (1) & OPEN (1) "G06"         ! open the gateway                      BTRIEVE gateway                 0145                                        OPCODE = 0                         ! set opcode to OPEN                    BTRIEVE gateway                 0146                                        DATALEN = 1024                     ! maximum buffer size                   BTRIEVE gateway                 0147                                        KEYNUM = 255                       ! use index route #255                  BTRIEVE gateway                 0148                                        KEY$="D:\BTRIEVE\ALPHA.SYS@00@"    ! set path for OPEN                     BTRIEVE gateway                 0149                                                                                                                   BTRIEVE gateway                 0150                                        PRINT (1) OPCODE;DATALEN;KEYNUM;KEY$;FCB$;STATUS  ! open                   BTRIEVE gateway                 0151                                                                                                                   BTRIEVE gateway                 0152                                        PRINT (0) "OPEN STATUS IS:";STATUS ! display the status                    BTRIEVE gateway                 0153                                                                                                                   BTRIEVE gateway                 0154                                4110    PRINT (0) "ENTER KEY NUMBER"       ! prompt                                BTRIEVE gateway                 0155                                        INPUT (0) KEYNUM                   ! get key number                        BTRIEVE gateway                 0156                                        IF KEYNUM EQ 999 THEN GOTO 4199    ! branch to end                         BTRIEVE gateway                 0157                                        PRINT (0) "ENTER OPCODE"           ! prompt                                BTRIEVE gateway                 0158                                        INPUT (0) OPCODE                   ! get opcode                            BTRIEVE gateway                 0159                                                                           ! 12 = GET FIRST                        BTRIEVE gateway                 0160                                                                           !  6 = GET NEXT                         BTRIEVE gateway                 0161                                                                                                                   BTRIEVE gateway                 0162                                        DATELEN = 1024                     ! maximum data length                   BTRIEVE gateway                 0163                                        KEY$ = STRING(" ",128)             ! fill with blanks                      BTRIEVE gateway                 0164                                                                                                                   BTRIEVE gateway                 0165                                        PRINT (1) OPCODE;DATALEN;KEYNUM;KEY$;FCB$;STATUS                           BTRIEVE gateway                 0166                                                                                                                   BTRIEVE gateway                 0167                                        READ (1,4100)                      ! read user's buffer                    BTRIEVE gateway                 0168                                                                                                                   BTRIEVE gateway                 0169                                        PRINT (0) "BTRIEVE STATUS IS ";STATUS   ! display status                   BTRIEVE gateway                 0170                                        PRINT (0) "DATA LENGTH IS ";DATALEN     ! display datalen                  BTRIEVE gateway                 0171                                        PRINT (0) "KEY IS ";KEY$;""             ! display key                      BTRIEVE gateway                 0172                                        PRINT (0) "DATA IS ";DATA$;""           ! display data                     BTRIEVE gateway                 0173                                        GOTO 4110                                                                  BTRIEVE gateway                 0174                                                                                                                   BTRIEVE gateway                 0175                                4199    INPUT (0) ""                                                               BTRIEVE gateway                 0176                                        GOTO 0000                                                                  CAS Control File                0001                              CAS Control File                                                                     CAS Control File                0002                              ================                                                                     CAS Control File                0003                                                                                                                   CAS Control File                0004                                Listed below is the general format of the CAS Control File. The                    CAS Control File                0005                                Offset column indicates the offset of the field (in bytes) from                    CAS Control File                0006                                the start of the file. The Length column indicates the length of                   CAS Control File                0007                                the field in bytes. The values listed in the Description field                     CAS Control File                0008                                are values. Multi-byte fields containing numeric, date, or time                    CAS Control File                0009                                values have the least-significant byte first.                                      CAS Control File                0010                                                                                                                   CAS Control File                0011                                This chart is excerpted from the DCA/Intel Communicating                           CAS Control File                0012                                Applications Specification, Version 1.2, by Digital                                CAS Control File                0013                                Communications Associates, Inc. and Intel Corporation.                             CAS Control File                0014                                                                                                                   CAS Control File                0015                                Offset  Length    Description                                                      CAS Control File                0016                                =================================================================                  CAS Control File                0017                                0       1         Event type:                                                      CAS Control File                0018                                                  0 - Send                                                         CAS Control File                0019                                                  1 - Receive                                                      CAS Control File                0020                                                  2 - Polled Send                                                  CAS Control File                0021                                                  3 - Polled Receive                                               CAS Control File                0022                                                  4 - Group Send (V1.2)                                            CAS Control File                0023                                                  5 - Group Polled Receive (V1.2)                                  CAS Control File                0024                                                  6-127 -  Reserved                                                CAS Control File                0025                                                  -1 (0FFH) - Serious hardware error not                           CAS Control File                0026                                                  associated with an ordinary event.                               CAS Control File                0027                                                                                                                   CAS Control File                0028                                1       1         Transfer type:                                                   CAS Control File                0029                                                  0 - 200x200 dpi, fax mode.                                       CAS Control File                0030                                                  1 - 100x200 dpi, fax mode.                                       CAS Control File                0031                                                  2 - File transfer mode.                                          CAS Control File                0032                                                  3-127 - Reserved.                                                CAS Control File                0033                                                                                                                   CAS Control File                0034                                2       2         Status of event:                                                 CAS Control File                0035                                                  0 - Successfully completed.                                      CAS Control File                0036                                                  1 - Waiting to be processed.                                     CAS Control File                0037                                                  2 - Number dialed or event in progress.                          CAS Control File                0038                                                  3 - Connection made -- sending.                                  CAS Control File                0039                                                  4 - Connection made -- receiving.                                CAS Control File                0040                                                  5 - Event was aborted.                                           CAS Control File                0041                                                  6-32,767 - Reserved.                                             CAS Control File                0042                                                  Negative value - Error.                                          CAS Control File                0043                                                                                                                   CAS Control File                0044                                4       2         Time you want to send the information (used for                  CAS Control File                0045                                                  send events only). For receive events, this is                   CAS Control File                0046                                                  the time the receive event occurred. The format                  CAS Control File                0047                                                  is in DOS file date and time format.                             CAS Control File                0048                                                                                                                   CAS Control File                0049                                6       2         Date you want to send the information (used for                  CAS Control File                0050                                                  send events only). For receive events, this is                   CAS Control File                0051                                                  the date the receive event occurred. The format                  CAS Control File                0052                                                  is in DOS file date and time format.                             CAS Control File                0053                                                                                                                   CAS Control File                0054                                                  Note:  Setting both the time and date fields to                  CAS Control File                0055                                                  zero schedules the file to be sent immediately.                  CAS Control File                0056                                                  Therefore, to send a file at once, zero the                      CAS Control File                0057                                                  four bytes (long word) at offset 4.                              CAS Control File                0058                                                                                                                   CAS Control File                0059                                8       2         Number of files to transfer (maximum 32766).                     CAS Control File                0060                                                                                                                   CAS Control File                0061                                10      2         Offset in this Control File of first File                        CAS Control File                0062                                                  Transfer Record.                                                 CAS Control File                0063                                                                                                                   CAS Control File                0064                                                  Note:  If you don't plan to include cover page                   CAS Control File                0065                                                  text (described at offset 383), this field must                  CAS Control File                0066                                                  specify offset 383. Otherwise, this field must                   CAS Control File                0067                                                  specify the offset immediately after the cover                   CAS Control File                0068                                                  page text.                                                       CAS Control File                0069                                                                                                                   CAS Control File                0070                                12      47        Phone number to call (or filename of Group File                  CAS Control File                0071                                                  (V1.2)), as an ASCIIZ string. For non-group                      CAS Control File                0072                                                  events, place a phone number in this field.                      CAS Control File                0073                                                  (The following information is new for V1.2.)                     CAS Control File                0074                                                  For group events, place the filename of the                      CAS Control File                0075                                                  Group File (without specifying the drive or                      CAS Control File                0076                                                  path) in this field. The Group File must be in                   CAS Control File                0077                                                  the same directory as the Control File for the                   CAS Control File                0078                                                  parent event when the event is submitted.                        CAS Control File                0079                                                                                                                   CAS Control File                0080                                59      64        Application-specific tag field, as an ASCIIZ                     CAS Control File                0081                                                  string.                                                          CAS Control File                0082                                                                                                                   CAS Control File                0083                                                  Note:  This field is used by applications to                     CAS Control File                0084                                                  identify Control Files that are "owned" by that                  CAS Control File                0085                                                  application. For example, when an application                    CAS Control File                0086                                                  creates Control Files, it can fill this field                    CAS Control File                0087                                                  with a specific ASCII string. Later, when it                     CAS Control File                0088                                                  checks Control Files, it can check for the same                  CAS Control File                0089                                                  string to ensure that it handles only the                        CAS Control File                0090                                                  Control Files that apply to it. If a file is                     CAS Control File                0091                                                  received as a file transfer this field will                      CAS Control File                0092                                                  have meaning in the Control File for the                         CAS Control File                0093                                                  receive event. If a file is received as a fax,                   CAS Control File                0094                                                  this field will be filled with zeros.                            CAS Control File                0095                                                                                                                   CAS Control File                0096                                123     1         Reserved. Set to zero.                                           CAS Control File                0097                                                                                                                   CAS Control File                0098                                124     1         Time length of phone connection: seconds (0 -                    CAS Control File                0099                                                  59). Has no meaning for parent Control Files.                    CAS Control File                0100                                                                                                                   CAS Control File                0101                                125     1         Time length of phone connection: minutes (0-                     CAS Control File                0102                                                  59). Has no meaning for parent Control Files.                    CAS Control File                0103                                                                                                                   CAS Control File                0104                                126     1         Time length of phone connection: hours (0-23.)                   CAS Control File                0105                                                  Has no meaning for parent Control Files.                         CAS Control File                0106                                                                                                                   CAS Control File                0107                                127     4         Total number of pages in all files. Has no                       CAS Control File                0108                                                  meaning for parent Control Files.                                CAS Control File                0109                                                                                                                   CAS Control File                0110                                131     4         Number of pages transmitted so far. Has no                       CAS Control File                0111                                                  meaning for parent Control Files.                                CAS Control File                0112                                                                                                                   CAS Control File                0113                                135     2         Number of files transmitted so far. Has no                       CAS Control File                0114                                                  meaning for parent Control Files.                                CAS Control File                0115                                                                                                                   CAS Control File                0116                                137     1         Cover page flag:                                                 CAS Control File                0117                                                  0 - Don't send cover page.                                       CAS Control File                0118                                                  1 - Send cover page.                                             CAS Control File                0119                                                  2-127 - Reserved.                                                CAS Control File                0120                                                                                                                   CAS Control File                0121                                138     2         Number of transmission errors reported by the                    CAS Control File                0122                                                  hardware for all transmissions controlled by                     CAS Control File                0123                                                  this Control File. Has no meaning for parent                     CAS Control File                0124                                                  Control Files.                                                   CAS Control File                0125                                                                                                                   CAS Control File                0126                                140     1         Delete files flag (V1.2). Determines whether or                  CAS Control File                0127                                                  not the files listed in the File Transfer                        CAS Control File                0128                                                  Records (FTRs) are deleted after the event is                    CAS Control File                0129                                                  completed. (The FTR use and format is describe                   CAS Control File                0130                                                  later in this specification in the section                       CAS Control File                0131                                                  titled "File Transfer Record (FTR).")                            CAS Control File                0132                                                  0 - Don't delete files after event                               CAS Control File                0133                                                  1 - Delete files if successful                                   CAS Control File                0134                                                  2 - Always delete files after event                              CAS Control File                0135                                                  3-127 - Reserved.                                                CAS Control File                0136                                                                                                                   CAS Control File                0137                                                  Note: This field is valid in a Control File for                  CAS Control File                0138                                                  event types 0 (send), 2 (polled send), and 4                     CAS Control File                0139                                                  (group send).                                                    CAS Control File                0140                                                                                                                   CAS Control File                0141                                                  If the event type is a group send and the value                  CAS Control File                0142                                                  of the delete files flag is 1 (delete if                         CAS Control File                0143                                                  successful), the files will only be deleted if                   CAS Control File                0144                                                  all sub-events have been successfully                            CAS Control File                0145                                                  completed. If the event is a group send and the                  CAS Control File                0146                                                  value of the flag is 2 (always delete), the                      CAS Control File                0147                                                  files will be deleted after all sub-events have                  CAS Control File                0148                                                  been attempted.                                                  CAS Control File                0149                                                                                                                   CAS Control File                0150                                                  If the delete files flag is set to 2 (always                     CAS Control File                0151                                                  delete), the files will always be deleted                        CAS Control File                0152                                                  whether the event is successful, canceled by                     CAS Control File                0153                                                  the user, or aborted during transmission due to                  CAS Control File                0154                                                  line or board errors.                                            CAS Control File                0155                                                                                                                   CAS Control File                0156                                141     2         Event handle for parent event (V1.2). The                        CAS Control File                0157                                                  Resident Manager assigns this handle.                            CAS Control File                0158                                                  Initialize to zero. This handle is zero if                       CAS Control File                0159                                                  there is no parent event.                                        CAS Control File                0160                                                                                                                   CAS Control File                0161                                143     53        Reserved. Set to zero.                                           CAS Control File                0162                                                                                                                   CAS Control File                0163                                196     20        Available for internal use by CAS                                CAS Control File                0164                                                  implementations (V1.2). Set to zero. This field                  CAS Control File                0165                                                  is available for CAS implementations to use for                  CAS Control File                0166                                                  internal flags and other features.                               CAS Control File                0167                                                                                                                   CAS Control File                0168                                216     1         Cover page read flag (V1.2). Initialize to                       CAS Control File                0169                                                  zero. The application can use CAS function 17H                   CAS Control File                0170                                                  to set this field to indicate whether or not                     CAS Control File                0171                                                  the user has read the cover page.                                CAS Control File                0172                                                  0 - cover page not read                                          CAS Control File                0173                                                  1 - cover page read                                              CAS Control File                0174                                                  2-127 - reserved                                                 CAS Control File                0175                                                                                                                   CAS Control File                0176                                217     1         Suppress Page Headers (V1.2). This field only                    CAS Control File                0177                                                  has meaning for faxes. Setting this field to 1                   CAS Control File                0178                                                  causes the line of fax addressing information                    CAS Control File                0179                                                  at the top of each fax page to be suppressed.                    CAS Control File                0180                                                  0 - Page Headers                                                 CAS Control File                0181                                                  1 - No Page Headers                                              CAS Control File                0182                                                  2-127 - reserved                                                 CAS Control File                0183                                                                                                                   CAS Control File                0184                                218     21        Remote CSID (the CCITT identification of the                     CAS Control File                0185                                                  fax device), as an ASCIIZ string (set by the                     CAS Control File                0186                                                  Resident Manager). Set to zero.                                  CAS Control File                0187                                                                                                                   CAS Control File                0188                                239     32        Destination Name, as an ASCIIZ string (To:                       CAS Control File                0189                                                  field).                                                          CAS Control File                0190                                                                                                                   CAS Control File                0191                                271     32        Sender Name, as an ASCIIZ string (From: field).                  CAS Control File                0192                                                                                                                   CAS Control File                0193                                303     80        Path and name of PCX logo file (maximum size                     CAS Control File                0194                                                  1728 x 800 pels), as an ASCIIZ string. A fully                   CAS Control File                0195                                                  qualified pathname for the file (including the                   CAS Control File                0196                                                  drive) must be entered.                                          CAS Control File                0197                                                                                                                   CAS Control File                0198                                383     var.      Cover page text, as an ASCIIZ string. The                        CAS Control File                0199                                                  length is variable, as indicated by var, but a                   CAS Control File                0200                                                  maximum of 36 lines of text is recommended (or                   CAS Control File                0201                                                  else the received page might be longer than 11                   CAS Control File                0202                                                  inches). Lines can be separated by new line                      CAS Control File                0203                                                  characters (0AH) or CR-LF pairs (0DH, 0AH).                      CAS Control File                0204                                                  Lines longer than 80 characters are wrapped                      CAS Control File                0205                                                  around.                                                          CAS Control File                0206                                                                                                                   CAS Control File                0207                                                  Note:  The text field is not required to be                      CAS Control File                0208                                                  present. If it is absent, the first File                         CAS Control File                0209                                                  Transfer Record (FTR) must start at offset 383.                  CAS Control File                0210                                                  In all cases, the field at offset 10 identifies                  CAS Control File                0211                                                  the start of the first FTR.                                      CAS Control File                0212                                                                                                                   CAS Control File                0213                                var.    var.      Table of 128-byte File Transfer Records (FTRs).                  CAS Control File                0214                                                  The first FTR begins at the offset specified by                  CAS Control File                0215                                                  the word at offset 10 of the Control File. The                   CAS Control File                0216                                                  following section describes the format of each                   CAS Control File                0217                                                  FTR.                                                             CEMTEST program                 0001                              Comet Electronic Mail Test Program                                                   CEMTEST program                 0002                              ==================================                                                   CEMTEST program                 0003                                                                                                                   CEMTEST program                 0004                                Below is a sample program that demonstrates how easy it is to                      CEMTEST program                 0005                                link your MTB applications to the Comet Electronic Mail system.                    CEMTEST program                 0006                                                                                                                   CEMTEST program                 0007                                !S CEMTESTS,CEM                                                                    CEMTEST program                 0008                                !O CEMTEST ,CEM                                                                    CEMTEST program                 0009                                !L LP1,E                                                                           CEMTEST program                 0010                                !R QMONITOR                                                                        CEMTEST program                 0011                                !                                                                                  CEMTEST program                 0012                                !===============================================================!                  CEMTEST program                 0013                                !                                                                                  CEMTEST program                 0014                                ! COMET ELECTRONIC MAIL ENGINE EXAMPLE USAGE PROGRAM                               CEMTEST program                 0015                                !                                                                                  CEMTEST program                 0016                                ! THIS CODE SENDS A MESSAGE VIA THE COMET EMAIL ENGINE                             CEMTEST program                 0017                                !                                                                                  CEMTEST program                 0018                                !===============================================================!                  CEMTEST program                 0019                                !                                                                                  CEMTEST program                 0020                                !======= USE COMET ELECTRONIC MAIL ENGINE DECLARATIVES =========!                  CEMTEST program                 0021                                !                                                                                  CEMTEST program                 0022                                USE "UFCEMDEC"     ! INCLUDES THE FIRST USEFILE                                    CEMTEST program                 0023                                !                                                                                  CEMTEST program                 0024                                !                                                                                  CEMTEST program                 0025                                TESTID:_                                                                           CEMTEST program                 0026                                   FORMAT (CS);@(0,10);(SB);"ENTER USER THE USER ID===>";_                         CEMTEST program                 0027                                   (SF);(TP);CEMTO$;(TP);(SB);(BF);@(2)                                            CEMTEST program                 0028                                !                                                                                  CEMTEST program                 0029                                TESTOUT:_                                                                          CEMTEST program                 0030                                   FORMAT      @(0,11);(SB);"ERRORNO=";CEMERRNO;"CEMSENT=";_                       CEMTEST program                 0031                                   CEMSENT;(SF);(TP);'  ';(TP);(SB);(BF);@(2)                                      CEMTEST program                 0032                                !                                                                                  CEMTEST program                 0033                                !                                                                                  CEMTEST program                 0034                                    SET CEMMMF  = 1     ! SETS LOGICAL UNIT NUMBER 1                               CEMTEST program                 0035                                    SET CEMMDF  = 2     ! SETS LOGICAL UNIT NUMBER 2                               CEMTEST program                 0036                                    SET CEMMRF  = 3     ! SETS LOGICAL UNIT NUMBER 3                               CEMTEST program                 0037                                    SET CEMMGF  = 4     ! SETS LOGICAL UNIT NUMBER 4                               CEMTEST program                 0038                                    SET CEMMHF  = 5     ! SETS LOGICAL UNIT NUMBER 5                               CEMTEST program                 0039                                    SET CEMMLF  = 6     ! SETS LOGICAL UNIT NUMBER 6                               CEMTEST program                 0040                                    SET CEMMPF  = 7     ! SETS LOGICAL UNIT NUMBER 7                               CEMTEST program                 0041                                !                                                                                  CEMTEST program                 0042                                !======= SET UP TEST MESSAGES =================================!                   CEMTEST program                 0043                                  CLEAR                                                                            CEMTEST program                 0044                                  CEMACTIONS$(1)='X'    ! SETS THE 'X' FLAGS FOR THE E-MAIL                        CEMTEST program                 0045                                  CEMACTIONS$(2)=' '    ! PROGRAM                                                  CEMTEST program                 0046                                  CEMACTIONS$(3)=' '                                                               CEMTEST program                 0047                                  CEMACTIONS$(4)=' '                                                               CEMTEST program                 0048                                  CEMACTIONS$(5)=' '                                                               CEMTEST program                 0049                                  CEMACTIONS$(6)=' '                                                               CEMTEST program                 0050                                  CEMACTIONS$(7)=' '                                                               CEMTEST program                 0051                                  CEMACTIONS$(8)=' '                                                               CEMTEST program                 0052                                  CEMACTIONS$(9)=' '                                                               CEMTEST program                 0053                                !                                                                                  CEMTEST program                 0054                                  CEMETIME$=''          ! SETS THE TIME AND DATE TO DEFAULTS                       CEMTEST program                 0055                                  CEMEDATE$=''                                                                     CEMTEST program                 0056                                !                                                                                  CEMTEST program                 0057                                  CEMFROM$="JOHN"        ! FILLS THE PROGRAM VARIABLES WITH                        CEMTEST program                 0058                                  CEMWITH$="ACCOUNTING"  ! SPECIFIC VALUES                                         CEMTEST program                 0059                                  CEMTAKENBY$=""                                                                   CEMTEST program                 0060                                  CEMPHONE$="555-1212"                                                             CEMTEST program                 0061                                  CEMSUBJECT$="BUDGET REPORTS"                                                     CEMTEST program                 0062                                  CEMTEXT$(1)="TO ALL DEPARTMENT MANAGERS:"                                        CEMTEST program                 0063                                  CEMTEXT$(2)=""                                                                   CEMTEST program                 0064                                  CEMTEXT$(3)="THIS IS A REMINDER THAT YOUR"                                       CEMTEST program                 0065                                  CEMTEXT$(4)="BUDGET REPORTS ARE DUE NEXT"                                        CEMTEST program                 0066                                  CEMTEXT$(5)="FRIDAY. PLEASE CALL ME IF YOU"                                      CEMTEST program                 0067                                  CEMTEXT$(6)="HAVE ANY QUESTIONS. THANKS."                                        CEMTEST program                 0068                                  CEMTEXT$(8)=""                                                                   CEMTEST program                 0069                                  CEMTEXT$(9)=""                                                                   CEMTEST program                 0070                                  CEMTEXT$(10)="P.S. - THE BUDGET MEETING IS"                                      CEMTEST program                 0071                                  CEMTEXT$(11)="STILL SET FOR TWO WEEKS FROM"                                      CEMTEST program                 0072                                  CEMTEXT$(12)="TUESDAY. SEE YOU THERE."                                           CEMTEST program                 0073                                !                                                                                  CEMTEST program                 0074                                   PRINT(0,TESTID)     ! DISPLAYS PROMPT ON SCREEN                                 CEMTEST program                 0075                                   INPUT(0) CEMTO$     ! ACCEPTS INPUT FROM SCREEN                                 CEMTEST program                 0076                                   GOSUB CEMSEND       ! BRANCHES TO THE "ENGINE"                                  CEMTEST program                 0077                                   PRINT(0,TESTOUT)    ! DISPLAYS ERROR VALUES (IF ANY)                            CEMTEST program                 0078                                                   ! FROM THE ENGINE                                               CEMTEST program                 0079                                   INPUT(0)''          ! DUMMY INPUT STALL                                         CEMTEST program                 0080                                !                                                                                  CEMTEST program                 0081                                   RUN "QMONITOR"      ! RETURNS TO THE COMET MONITOR PROGRAM                      CEMTEST program                 0082                                !                                                                                  CEMTEST program                 0083                                !                                                                                  CEMTEST program                 0084                                !========== USE COMET ELECTRONIC MAIL ENGINE CODE =============!                   CEMTEST program                 0085                                !                                                                                  CEMTEST program                 0086                                USE "UFCEMEXE"         ! INCLUDES THE SECOND USEFILE                               Close the mouse                 0001                              Close the mouse                                                                      Close the mouse                 0002                              ===============                                                                      Close the mouse                 0003                                                                                                                   Close the mouse                 0004                                Use the following instruction to close the mouse driver:                           Close the mouse                 0005                                                                                                                   Close the mouse                 0006                                   PRINT (0) <(Close mouse),#HELPMT3>                                              Comet Electronic Mail           0001                              Comet Electronic Mail                                                                Comet Electronic Mail           0002                              =====================                                                                Comet Electronic Mail           0003                                                                                                                   Comet Electronic Mail           0004                                The standard release of Comet includes two MTB subroutines that                    Comet Electronic Mail           0005                                may be used by Comet developers to interface MTB application                       Comet Electronic Mail           0006                                programs to the electronic mail system. Both subroutines take the                  Comet Electronic Mail           0007                                form of MTB usefiles -- files that are inserted at compile time                    Comet Electronic Mail           0008                                into an object program.                                                            Comet Electronic Mail           0009                                                                                                                   Comet Electronic Mail           0010                                These two subroutines are called the Comet Electronic Mail                         Comet Electronic Mail           0011                                Engine. One of the subroutines contains the declarative and                        Comet Electronic Mail           0012                                format statements necessary for sending messages to the e-mail                     Comet Electronic Mail           0013                                system, and the other subroutine contains the executable code                      Comet Electronic Mail           0014                                that writes the messages to the e-mail system.                                     Comet Electronic Mail           0015                                                                                                                   Comet Electronic Mail           0016                                Usefile      Contents                                                              Comet Electronic Mail           0017                                =================================================================                  Comet Electronic Mail           0018                                UFCEMDEC     declarative and format statements                                     Comet Electronic Mail           0019                                UFCEMEXE     executable code                                                       Comet Electronic Mail           0020                                                                                                                   Comet Electronic Mail           0021                                Note: Both files are text files and are located in the UTL                         Comet Electronic Mail           0022                                directory of the standard Comet release.                                           Comet Electronic Mail           0023                                                                                                                   Comet Electronic Mail           0024                                To incorporate these usefiles into your MTB programs, you must:                    Comet Electronic Mail           0025                                                                                                                   Comet Electronic Mail           0026                                *  include the UFCEMDEC usefile in the declarative section of                      Comet Electronic Mail           0027                                   your program                                                                    Comet Electronic Mail           0028                                                                                                                   Comet Electronic Mail           0029                                *  include the UFCEMEXE usefile in the executable section of your                  Comet Electronic Mail           0030                                   program                                                                         Comet Electronic Mail           0031                                                                                                                   Comet Electronic Mail           0032                                *  set the file logical unit numbers in the format section of                      Comet Electronic Mail           0033                                   your program (the "engine" uses 7 logical unit numbers; all                     Comet Electronic Mail           0034                                   are defined with the SET statement)                                             Comet Electronic Mail           0035                                                                                                                   Comet Electronic Mail           0036                                *  assign the values to the entry variables (the data to be                        Comet Electronic Mail           0037                                   written to the e-mail system), including:                                       Comet Electronic Mail           0038                                                                                                                   Comet Electronic Mail           0039                                   - name of the recipient                                                         Comet Electronic Mail           0040                                   - name of the sender (optional)                                                 Comet Electronic Mail           0041                                   - company name (optional)                                                       Comet Electronic Mail           0042                                   - subject of the message (optional)                                             Comet Electronic Mail           0043                                   - phone number (optional)                                                       Comet Electronic Mail           0044                                   - time (default is system time)                                                 Comet Electronic Mail           0045                                   - date (default is system date)                                                 Comet Electronic Mail           0046                                   - message flags (marked with an "X")                                            Comet Electronic Mail           0047                                   - up to 12 message lines                                                        Comet Electronic Mail           0048                                                                                                                   Comet Electronic Mail           0049                                *  GOSUB to the "engine."  The statement label for the engine is                   Comet Electronic Mail           0050                                   CEMSEND. This subroutine writes the message to the appropriate                  Comet Electronic Mail           0051                                   e-mail files and notifies the recipient(s) that a message has                   Comet Electronic Mail           0052                                   been sent.                                                                      Comet Electronic Mail           0053                                                                                                                   Comet Electronic Mail           0054                                After the CEMSEND subroutine is executed, two exit variables may                   Comet Electronic Mail           0055                                be examined. One variable (CEMSENT) contains the number of                         Comet Electronic Mail           0056                                messages that have been sent (for verifying group messages), the                   Comet Electronic Mail           0057                                other (CEMERRNO) contains a program-internal error number (for                     Comet Electronic Mail           0058                                verifying the status of the sent message).                                         Comet Electronic Mail           0059                                                                                                                   Comet Electronic Mail           0060                                See the <sample program|CEMTEST program>                                           Comet windows                   0001                              Comet windows                                                                        Comet windows                   0002                              =============                                                                        Comet windows                   0003                                                                                                                   Comet windows                   0004                                MTB provides an easy way to create windows on the console screen.                  Comet windows                   0005                                Once a window in created, all console I/O happens within that                      Comet windows                   0006                                window (i.e., screen displays and position coordinates, keyboard                   Comet windows                   0007                                input, mouse input, and touch-screen input). If multiple windows                   Comet windows                   0008                                are created, the I/O happens in the most-recently created window.                  Comet windows                   0009                                                                                                                   Comet windows                   0010                                For more information see:                                                          Comet windows                   0011                                                                                                                   Comet windows                   0012                                <Creating windows>                                                                 Comet windows                   0013                                <Deleting windows>                                                                 Comet windows                   0014                                <Windows title line>                                                               Comet windows                   0015                                <Setting window colors>                                                            Comet windows                   0016                                <Window memory>                                                                    Comet windows                   0017                                <Sample window program>                                                            Copyright                       0001                              Copyright Notice                                                                     Copyright                       0002                              ================                                                                     Copyright                       0003                                                                                                                   Copyright                       0004                                This software package and documentation are copyrighted 1986-1996                  Copyright                       0005                                by Signature Systems, Inc. All rights reserved worldwide. No part                  Copyright                       0006                                of this publication may be reproduced, transmitted, transcribed,                   Copyright                       0007                                stored in any retrieval system, or translated into any language                    Copyright                       0008                                by any means without the express written permission of Signature                   Copyright                       0009                                Systems, Inc., 4325 Harrison Grade Road, Sebastopol, CA 95472.                     Copyright                       0010                                                                                                                   Copyright                       0011                              Disclaimer                                                                           Copyright                       0012                              ==========                                                                           Copyright                       0013                                                                                                                   Copyright                       0014                                Signature Systems, Inc. makes no warranties as to the contents of                  Copyright                       0015                                this documentation and specifically disclaims any implied                          Copyright                       0016                                warranties of merchantability or fitness for any particular                        Copyright                       0017                                purpose. Signature Systems further reserves the right to make                      Copyright                       0018                                changes to the specifications of the program and contents of the                   Copyright                       0019                                documentation without obligation to notify any person or                           Copyright                       0020                                organization of such changes.                                                      Copyright                       0021                                                                                                                   Copyright                       0022                              License Agreement                                                                    Copyright                       0023                              =================                                                                    Copyright                       0024                                                                                                                   Copyright                       0025                                The software described in this documentation is furnished under a                  Copyright                       0026                                license agreement and may be used or copied only in accordance                     Copyright                       0027                                with the terms of the agreement. Failure to sign this agreement                    Copyright                       0028                                and still use the software is illegal.                                             Copyright                       0029                                                                                                                   Copyright                       0030                              Trademark Credits                                                                    Copyright                       0031                              =================                                                                    Copyright                       0032                                                                                                                   Copyright                       0033                                Trademarks used in this manual belong to their respective owners.                  Copyright                       0034                                                                                                                   Copyright                       0035                              Publication Information                                                              Copyright                       0036                              =======================                                                              Copyright                       0037                                                                                                                   Copyright                       0038                                First on-line edition September 1996.                                              Creating Custom Lookup Programs 0001                              Creating Custom Lookup Programs                                                      Creating Custom Lookup Programs 0002                              ===============================                                                      Creating Custom Lookup Programs 0003                                                                                                                   Creating Custom Lookup Programs 0004                                The following information is for programmers who want to create                    Creating Custom Lookup Programs 0005                                custom lookup programs for the Comet Help System.                                  Creating Custom Lookup Programs 0006                                                                                                                   Creating Custom Lookup Programs 0007                                The Comet Help System lets you use the following lookup programs:                  Creating Custom Lookup Programs 0008                                *  table lookup programs                                                           Creating Custom Lookup Programs 0009                                *  custom lookup programs                                                          Creating Custom Lookup Programs 0010                                                                                                                   Creating Custom Lookup Programs 0011                                The Comet Help System gives you a convenient way to write custom                   Creating Custom Lookup Programs 0012                                lookup programs. If the link has been established, the user can                    Creating Custom Lookup Programs 0013                                invoke a lookup program at any data entry field.                                   Creating Custom Lookup Programs 0014                                                                                                                   Creating Custom Lookup Programs 0015                                Your lookup programs run as Comet subprograms, meaning that they                   Creating Custom Lookup Programs 0016                                are executed with and <ENTER,#HELPMT4> statement and must end                      Creating Custom Lookup Programs 0017                                with an <EXIT,#HELPMT4> statement (not a RUN statement).                           Creating Custom Lookup Programs 0018                                                                                                                   Creating Custom Lookup Programs 0019                                   See the <Subprograms,#HELPMT2> page for more information.                       Creating Custom Lookup Programs 0020                                                                                                                   Creating Custom Lookup Programs 0021                                In addition, your lookup programs have full control of the video                   Creating Custom Lookup Programs 0022                                screen while they are running, allowing for the possibility of                     Creating Custom Lookup Programs 0023                                overwriting the existing display. For this reason, we suggest                      Creating Custom Lookup Programs 0024                                that you use windows with your lookup programs.                                    Creating Custom Lookup Programs 0025                                                                                                                   Creating Custom Lookup Programs 0026                                   See the <Comet windows> page for more information.                              Creating Custom Lookup Programs 0027                                                                                                                   Creating Custom Lookup Programs 0028                                To assist you in writing lookup programs, Comet passes several                     Creating Custom Lookup Programs 0029                                parameters to the lookup program. These items include:                             Creating Custom Lookup Programs 0030                                                                                                                   Creating Custom Lookup Programs 0031                                1.      the name of the object program being run in your                           Creating Custom Lookup Programs 0032                                        partition                                                                  Creating Custom Lookup Programs 0033                                2.      the current execution address (in hex)                                     Creating Custom Lookup Programs 0034                                3.      the starting screen position of the current data entry                     Creating Custom Lookup Programs 0035                                        field (in hex, byte 1=column, byte 2=row)                                  Creating Custom Lookup Programs 0036                                4.      the current cursor position (in hex, byte 1=column, byte                   Creating Custom Lookup Programs 0037                                        2=row)                                                                     Creating Custom Lookup Programs 0038                                5.      the size of the input field (in hex)                                       Creating Custom Lookup Programs 0039                                6.      the length from the start of the field to the current                      Creating Custom Lookup Programs 0040                                        cursor position (in hex)                                                   Creating Custom Lookup Programs 0041                                7.      the contents of the input field                                            Creating Custom Lookup Programs 0042                                8.      several flags reserved for future use                                      Creating Custom Lookup Programs 0043                                9.      HELPKEY$ value (4 bytes)                                                   Creating Custom Lookup Programs 0044                                10.     NAME OF Lookup Table or Custom Lookup Program                              Creating Custom Lookup Programs 0045                                11.     upper corner of lookup window (in hex, byte 1=column,                      Creating Custom Lookup Programs 0046                                        byte 2=row)                                                                Creating Custom Lookup Programs 0047                                12.     lower corner of lookup window (in hex, byte 1=column,                      Creating Custom Lookup Programs 0048                                        byte 2=row)                                                                Creating Custom Lookup Programs 0049                                13.     colors for lookup window (in hex, byte 1=foreground, byte                  Creating Custom Lookup Programs 0050                                        2=background, byte 3=invisible, byte 4=border, byte                        Creating Custom Lookup Programs 0051                                        5=entry)                                                                   Creating Custom Lookup Programs 0052                                                                                                                   Creating Custom Lookup Programs 0053                                This data is initially passed through the user buffer to the NOVA                  Creating Custom Lookup Programs 0054                                program. Your lookup programs can access this data through the                     Creating Custom Lookup Programs 0055                                COMMON variables declared in the NOVA program. See the XHELPCM                     Creating Custom Lookup Programs 0056                                usefile in the utility program source directory.                                   Creating windows                0001                              Creating windows                                                                     Creating windows                0002                              ================                                                                     Creating windows                0003                                                                                                                   Creating windows                0004                                The <(Create Window),#HELPMT3> mnemonic creates a window.                          Creating windows                0005                                Typically, Comet windows are created with a different color                        Creating windows                0006                                scheme than the underlying display. See <Setting window colors>.                   Creating windows                0007                                                                                                                   Creating windows                0008                                Also see <Deleting windows>.                                                       Creating windows                0009                                                                                                                   Creating windows                0010                              Example:                                                                             Creating windows                0011                                                                                                                   Creating windows                0012                                PRINT (0) (Create Window=2,3,70,20)                                                Creating windows                0013                                                                                                                   Creating windows                0014                                This instruction creates a window from column 2, row 3 (the upper                  Creating windows                0015                                left corner) to column 70, row 20 (the lower right corner).                        DOS Calls Background Discussion 0001                              DOS Calls Background Discussion                                                      DOS Calls Background Discussion 0002                              ===============================                                                      DOS Calls Background Discussion 0003                                                                                                                   DOS Calls Background Discussion 0004                                The Disk Operating System (DOS) employees four general-purpose                     DOS Calls Background Discussion 0005                                CPU registers called AX, BX, CX, and DX. These registers contain                   DOS Calls Background Discussion 0006                                two bytes each and are used in the Comet-to-DOS system function                    DOS Calls Background Discussion 0007                                calls.                                                                             DOS Calls Background Discussion 0008                                                                                                                   DOS Calls Background Discussion 0009                                On many occasions, the two-byte registers are divided in half                      DOS Calls Background Discussion 0010                                (for reference purposes). The "lower" half is referred to as the                   DOS Calls Background Discussion 0011                                "L" portion and the "upper" half is referred to as the "H"                         DOS Calls Background Discussion 0012                                portion. For example, the notation "AL" represents the lower byte                  DOS Calls Background Discussion 0013                                of the AX register and "AH" represents the upper byte of the AX                    DOS Calls Background Discussion 0014                                register.                                                                          DOS Calls Background Discussion 0015                                                                                                                   DOS Calls Background Discussion 0016                                The function calls documented herein contain references to the AX                  DOS Calls Background Discussion 0017                                through DX registers (and their upper and lower halves in some                     DOS Calls Background Discussion 0018                                cases). Typically, a function call requires that certain values                    DOS Calls Background Discussion 0019                                be set prior to the function call itself.                                          DOS Calls Background Discussion 0020                                                                                                                   DOS Calls Background Discussion 0021                                Following the execution of the function call, some of the                          DOS Calls Background Discussion 0022                                registers will contain return values. Since these return values                    DOS Calls Background Discussion 0023                                (actually the contents of the registers) will be changed upon the                  DOS Calls Background Discussion 0024                                execution of another function call, it is imperative that your                     DOS Calls Background Discussion 0025                                program store the return value(s) for subsequent use.                              DOS Calls Background Discussion 0026                                                                                                                   DOS Calls Background Discussion 0027                                For consistency of notation in this documentation, the register                    DOS Calls Background Discussion 0028                                values set prior to each host system function call are referred                    DOS Calls Background Discussion 0029                                to as the "entry" values. Likewise, the register values returned                   DOS Calls Background Discussion 0030                                after the function call is executed are called "return" values.                    DOS Calls Background Discussion 0031                                                                                                                   DOS Calls Background Discussion 0032                              Example:                                                                             DOS Calls Background Discussion 0033                                                                                                                   DOS Calls Background Discussion 0034                                The <DOSFC> function call can be used to create a DOS file. The                    DOS Calls Background Discussion 0035                                function call requires three parameters, an AX value, a CX value,                  DOS Calls Background Discussion 0036                                and the name of the file to be created.                                            DOS Calls Background Discussion 0037                                                                                                                   DOS Calls Background Discussion 0038                                The AX value must be set to "@3C00@" prior to executing the                        DOS Calls Background Discussion 0039                                function. Hex 3C is the DOS command used to create a file. Also,                   DOS Calls Background Discussion 0040                                CX must be set to null, and the file name must be supplied. A                      DOS Calls Background Discussion 0041                                segment of the MTB program to accomplish this would look like                      DOS Calls Background Discussion 0042                                this:                                                                              DOS Calls Background Discussion 0043                                                                                                                   DOS Calls Background Discussion 0044                                AX$ = "@3C00@"                   ! Set AX register to "CREATE"                     DOS Calls Background Discussion 0045                                CX$ = "@0000@"                   ! Set CX register to null                         DOS Calls Background Discussion 0046                                FILENAME$ = "A:\TEST"            ! Set file name                                   DOS Calls Background Discussion 0047                                                                                                                   DOS Calls Background Discussion 0048                                DOSFC(AX$,CX$,FILENAME$) EXCP=99 ! Execute function call                           DOS Calls Background Discussion 0049                                                                                                                   DOS Calls Background Discussion 0050                                When this function call is executed, the file named "TEST" will                    DOS Calls Background Discussion 0051                                be created on disk drive A:.                                                       DOS Calls Background Discussion 0052                                                                                                                   DOS Calls Background Discussion 0053                                The DOSFC function call returns a value in the AX register.  If                    DOS Calls Background Discussion 0054                                the function is executed successfully, the AX register will                        DOS Calls Background Discussion 0055                                contain the file's handle (a number assigned to the file by DOS;                   DOS Calls Background Discussion 0056                                similar in concept to Comet's logical unit number).                                DOS Calls Background Discussion 0057                                                                                                                   DOS Calls Background Discussion 0058                                Since the AX register can (and will) change, it is prudent to                      DOS Calls Background Discussion 0059                                store the file's handle in a program variable for future use, as                   DOS Calls Background Discussion 0060                                follows:                                                                           DOS Calls Background Discussion 0061                                                                                                                   DOS Calls Background Discussion 0062                                FILEHANDLE$ = AX$                ! Store file handle from AX$                      DOS Calls Background Discussion 0063                                                                                                                   DOS Calls Background Discussion 0064                                Other function calls like read, write, and close require the                       DOS Calls Background Discussion 0065                                file's handle. The above method ensures that the handle is stored                  DOS Calls Background Discussion 0066                                for these subsequent purposes.                                                     DOS Calls Background Discussion 0067                                                                                                                   DOS Calls Background Discussion 0068                                If the DOSFC function encounters an exception when it is                           DOS Calls Background Discussion 0069                                executed, the exception branch is taken (in this case, the                         DOS Calls Background Discussion 0070                                program will branch to statement-label 99) and the AX register                     DOS Calls Background Discussion 0071                                will contain the DOS error code. Note: the Comet exception code                    DOS Calls Background Discussion 0072                                will always by 27 when a DOS error is encountered.                                 DOS Calls Background Discussion 0073                                                                                                                   DOS Calls Background Discussion 0074                                In fact, only the 2nd byte of the AX register is of concern. The                   DOS Calls Background Discussion 0075                                following program segment shows how to construct and print an                      DOS Calls Background Discussion 0076                                error message for a DOS function call error. The DOS error code                    DOS Calls Background Discussion 0077                                descriptions are maintained in a Comet file called "QERCOMET".                     DOS Calls Background Discussion 0078                                Each DOS error code consists of the letter "D" followed by the                     DOS Calls Background Discussion 0079                                two-byte DOS error code.                                                           DOS Calls Background Discussion 0080                                                                                                                   DOS Calls Background Discussion 0081                                Note: To construct the proper key to the QERCOMET file, we'll                      DOS Calls Background Discussion 0082                                need to convert the 2nd byte of the AX register to its ASCII                       DOS Calls Background Discussion 0083                                equivalent and append the letter "D" to the front of it. We'll                     DOS Calls Background Discussion 0084                                use the HEXASC function to do the conversion from hex to ASCII:                    DOS Calls Background Discussion 0085                                                                                                                   DOS Calls Background Discussion 0086                                LENGTH 3 & LOCAL DOSCODE$             ! Define DOSCODE$ string                     DOS Calls Background Discussion 0087                                LENGTH 37 & LOCAL DOSMESSAGE$         ! Define message string                      DOS Calls Background Discussion 0088                                1000 FORMAT DOSMESSAGE$               ! Format for message                         DOS Calls Background Discussion 0089                                .                                                                                  DOS Calls Background Discussion 0090                                9999 OPEN (1) "QERCOMET"              ! Open file                                  DOS Calls Background Discussion 0091                                   DOSCODE$ = "D"+HEXASC(SUB(A$,2,1)) ! Construct key                              DOS Calls Background Discussion 0092                                   READ (1,1000) KEY=DOSCODE$         ! Read record                                DOS Calls Background Discussion 0093                                   PRINT (0) "DOS error:";DOSCODE$    ! Display code                               DOS Calls Background Discussion 0094                                   PRINT (0) DOSMESSAGE$              ! Display message                            DOS Calls Background Discussion 0095                                   INPUT (0) ""                       ! Hold display                               DOS Calls Background Discussion 0096                                   CLOSE (1)                          ! Close file                                 DOS Calls Background Discussion 0097                                   RUN "QMONITOR"                     ! Exit program                               DOS Function Calls              0001                              DOS Function Calls                                                                   DOS Function Calls              0002                              ==================                                                                   DOS Function Calls              0003                                                                                                                   DOS Function Calls              0004                                MTB programs can make direct calls to the Disk Operating System                    DOS Function Calls              0005                                (DOS) via the <DOSFC>, <DOSRW>, and <DOSMS> statements.                            DOS Function Calls              0006                                                                                                                   DOS Function Calls              0007                                See <DOS Calls Background Discussion> for more information.                        DOS Function Calls              0008                                                                                                                   DOS Function Calls              0009                                Also see <Pseudo DOS Functions>.                                                   DOS Function Calls              0010                                                                                                                   DOS Function Calls              0011                                Note: These host system function calls are very powerful                           DOS Function Calls              0012                                interfaces to the DOS environment. They require care and good                      DOS Function Calls              0013                                planning to be used effectively. Since this document does not                      DOS Function Calls              0014                                pretend to be a substitute for complete DOS documentation, we                      DOS Function Calls              0015                                recommend that you refer to the DOS Technical Reference Manual                     DOS Function Calls              0016                                before implementing these functions in your MTB programs.                          DOS Function Calls              0017                                                                                                                   DOS Function Calls              0018                                It is the responsibility of the programmer to ensure that any                      DOS Function Calls              0019                                file handles opened are closed upon completion of the desired                      DOS Function Calls              0020                                function.  Failure to comply will result in degradation of system                  DOS Function Calls              0021                                performance and possible system hangs.                                             DOS Function Calls              0022                                                                                                                   DOS Function Calls              0023                                The following DOS function calls are included in this document:                    DOS Function Calls              0024                                <Change Current DOS Directory|DOS:CHDIR>                                           DOS Function Calls              0025                                <Close DOS File|DOS:CLOSE>                                                         DOS Function Calls              0026                                <Create DOS File|DOS:CREATE>                                                       DOS Function Calls              0027                                <Create DOS Subdirectory|DOS:MKDIR>                                                DOS Function Calls              0028                                <Erase DOS File|DOS:ERASE>                                                         DOS Function Calls              0029                                <Get DOS Date|DOS:GETDATE>                                                         DOS Function Calls              0030                                <Get DOS Time|DOS:GETTIME>                                                         DOS Function Calls              0031                                <Move File Read/Write Pointer|DOS:LSEEK>                                           DOS Function Calls              0032                                <Open DOS File|DOS:OPEN>                                                           DOS Function Calls              0033                                <Read From a DOS File|DOS:READ>                                                    DOS Function Calls              0034                                <Remove DOS Subdirectory|DOS:RMDIR>                                                DOS Function Calls              0035                                <Write to a DOS File|DOS:WRITE>                                                    DOS:CHDIR                       0001  Change Current DOS DirectoryChange Current DOS Directory (CHDIR)                                                 DOS:CHDIR                       0002  Change Current DOS Directory====================================                                                 DOS:CHDIR                       0003  Change Current DOS DirectorySyntax:                                                                              DOS:CHDIR                       0004  Change Current DOS Directory                                                                                     DOS:CHDIR                       0005  Change Current DOS Directory  DOSFC(AX-value, CX-value, subdirectory-name) EXCP=statement-label                  DOS:CHDIR                       0006  Change Current DOS Directory                                                                                     DOS:CHDIR                       0007  Change Current DOS DirectoryEntry:                                                                               DOS:CHDIR                       0008  Change Current DOS Directory                                                                                     DOS:CHDIR                       0009  Change Current DOS Directory  AX-value = "@3B00@"                                                                DOS:CHDIR                       0010  Change Current DOS Directory  CX-value = "@0000@"                                                                DOS:CHDIR                       0011  Change Current DOS Directory                                                                                     DOS:CHDIR                       0012  Change Current DOS DirectoryReturn:                                                                              DOS:CHDIR                       0013  Change Current DOS Directory                                                                                     DOS:CHDIR                       0014  Change Current DOS Directory  If an exception occurs, byte 2 of the AX field will contain the                    DOS:CHDIR                       0015  Change Current DOS Directory  DOS error code (in hex).                                                           DOS:CHDIR                       0016  Change Current DOS Directory                                                                                     DOS:CHDIR                       0017  Change Current DOS DirectoryDiscussion:                                                                          DOS:CHDIR                       0018  Change Current DOS Directory                                                                                     DOS:CHDIR                       0019  Change Current DOS Directory  The DOSFC function call can be used to change the current DOS                      DOS:CHDIR                       0020  Change Current DOS Directory  directory.  This function requires that the AX-value be set to                     DOS:CHDIR                       0021  Change Current DOS Directory  "@3B00@", the CX-value be set to null, and the subdirectory-name                   DOS:CHDIR                       0022  Change Current DOS Directory  contain the name of the new DOS subdirectory.                                      DOS:CHDIR                       0023  Change Current DOS Directory                                                                                     DOS:CHDIR                       0024  Change Current DOS Directory  After the DOSFC function is executed, the current directory will                   DOS:CHDIR                       0025  Change Current DOS Directory  be changed to the directory name supplied in the call.                             DOS:CHDIR                       0026  Change Current DOS Directory                                                                                     DOS:CHDIR                       0027  Change Current DOS DirectoryExample:                                                                             DOS:CHDIR                       0028  Change Current DOS Directory                                                                                     DOS:CHDIR                       0029  Change Current DOS Directory  ! S SCHDIR,DSK                                                                     DOS:CHDIR                       0030  Change Current DOS Directory  ! O CHDIR,DSK                                                                      DOS:CHDIR                       0031  Change Current DOS Directory  ! L T00,E                                                                          DOS:CHDIR                       0032  Change Current DOS Directory  ! R QMONITOR                                                                       DOS:CHDIR                       0033  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0034  Change Current DOS Directory  !==========  CHANGE CURRENT DOS DIRECTORY =======================                  DOS:CHDIR                       0035  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0036  Change Current DOS Directory  LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:CHDIR                       0037  Change Current DOS Directory  LENGTH 64 & LOCAL DIRECTORY$            ! Define directory name                    DOS:CHDIR                       0038  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0039  Change Current DOS Directory  LENGTH 3 & LOCAL DOSCODE$               ! Define DOS error code                    DOS:CHDIR                       0040  Change Current DOS Directory  LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:CHDIR                       0041  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0042  Change Current DOS Directory  1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:CHDIR                       0043  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0044  Change Current DOS Directory  100 FORMAT (ET)                         ! Screen format                            DOS:CHDIR                       0045  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0046  Change Current DOS Directory  CLEAR                                   ! Initialize variables                     DOS:CHDIR                       0047  Change Current DOS Directory  PRINT (0,100)                           ! Set typewriter mode                      DOS:CHDIR                       0048  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0049  Change Current DOS Directory  PRINT (0) "ENTER DIRECTORY NAME:"       ! Display prompt                           DOS:CHDIR                       0050  Change Current DOS Directory  INPUT (0) DIRECTORY$                    ! Enter directory name                     DOS:CHDIR                       0051  Change Current DOS Directory  IF DIRECTORY$ = "" THEN RUN "QMONITOR"  ! If null, then stop                       DOS:CHDIR                       0052  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0053  Change Current DOS Directory  AX$ = "@3B00@"                          ! Set AX to "Chg. dir."                    DOS:CHDIR                       0054  Change Current DOS Directory  CX$ = "@0000@"                          ! Set CX register to null                  DOS:CHDIR                       0055  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0056  Change Current DOS Directory  DOSFC(AX$,CX$,DIRECTORY$) EXCP=EXCEPTION  ! Perform DOSFC call                     DOS:CHDIR                       0057  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0058  Change Current DOS Directory  PRINT (0) "CHANGED TO SUBDIRECTORY ";DIRECTORY$                                    DOS:CHDIR                       0059  Change Current DOS Directory  INPUT (0) ""                                                                       DOS:CHDIR                       0060  Change Current DOS Directory  RUN "QMONITOR"                                                                     DOS:CHDIR                       0061  Change Current DOS Directory  !                                                                                  DOS:CHDIR                       0062  Change Current DOS Directory  EXCEPTION:                              ! Exception routine                        DOS:CHDIR                       0063  Change Current DOS Directory  PRINT (0) "DIRECTORY NOT CHANGED."      ! Display message                          DOS:CHDIR                       0064  Change Current DOS Directory  OPEN (1) "QERCOMET"                     ! Open error file                          DOS:CHDIR                       0065  Change Current DOS Directory  DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:CHDIR                       0066  Change Current DOS Directory  READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:CHDIR                       0067  Change Current DOS Directory  PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:CHDIR                       0068  Change Current DOS Directory  PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:CHDIR                       0069  Change Current DOS Directory  INPUT (0) ""                            ! Hold                                     DOS:CHDIR                       0070  Change Current DOS Directory  CLOSE (1)                               ! Close error file                         DOS:CHDIR                       0071  Change Current DOS Directory  RUN "QMONITOR"                          ! Exit                                     DOS:CHDIR                       0072  Change Current DOS Directory  END                                                                                DOS:CLOSE                       0001  Close DOS File Handle       Close DOS File Handle                                                                DOS:CLOSE                       0002  Close DOS File Handle       =====================                                                                DOS:CLOSE                       0003  Close DOS File Handle                                                                                            DOS:CLOSE                       0004  Close DOS File Handle       Syntax:                                                                              DOS:CLOSE                       0005  Close DOS File Handle                                                                                            DOS:CLOSE                       0006  Close DOS File Handle         DOSMS(AX-value,BX-value,CX-value,DX-value) EXCP=statement-label                    DOS:CLOSE                       0007  Close DOS File Handle                                                                                            DOS:CLOSE                       0008  Close DOS File Handle       Entry:                                                                               DOS:CLOSE                       0009  Close DOS File Handle                                                                                            DOS:CLOSE                       0010  Close DOS File Handle         AX-value = "@3E00@"                                                                DOS:CLOSE                       0011  Close DOS File Handle         BX-value = file handle (from previous open)                                        DOS:CLOSE                       0012  Close DOS File Handle         CX-value = "@0000@"                                                                DOS:CLOSE                       0013  Close DOS File Handle         DX-value = "@0000@"                                                                DOS:CLOSE                       0014  Close DOS File Handle                                                                                            DOS:CLOSE                       0015  Close DOS File Handle       Return:                                                                              DOS:CLOSE                       0016  Close DOS File Handle                                                                                            DOS:CLOSE                       0017  Close DOS File Handle         If an exception occurs, byte 2 of the AX field will contain the                    DOS:CLOSE                       0018  Close DOS File Handle         DOS error code (in hex).                                                           DOS:CLOSE                       0019  Close DOS File Handle                                                                                            DOS:CLOSE                       0020  Close DOS File Handle       Discussion:                                                                          DOS:CLOSE                       0021  Close DOS File Handle                                                                                            DOS:CLOSE                       0022  Close DOS File Handle         The DOSMS function call can be used to close a currently open DOS                  DOS:CLOSE                       0023  Close DOS File Handle         file. This call requires the file's handle, a value assigned when                  DOS:CLOSE                       0024  Close DOS File Handle         the file is opened.                                                                DOS:CLOSE                       0025  Close DOS File Handle                                                                                            DOS:CLOSE                       0026  Close DOS File Handle         Other parameters include an AX-value of "@3E00@" and CX and DX                     DOS:CLOSE                       0027  Close DOS File Handle         values of null.                                                                    DOS:CLOSE                       0028  Close DOS File Handle                                                                                            DOS:CLOSE                       0029  Close DOS File Handle         After the call is executed, the file will be closed. As noted                      DOS:CLOSE                       0030  Close DOS File Handle         earlier, it is the responsibility of the programmer to ensure                      DOS:CLOSE                       0031  Close DOS File Handle         that any file handles opened are closed upon completion of the                     DOS:CLOSE                       0032  Close DOS File Handle         desired function. Failure to comply will result in degradation of                  DOS:CLOSE                       0033  Close DOS File Handle         system performance and possible system hangs.                                      DOS:CLOSE                       0034  Close DOS File Handle                                                                                            DOS:CLOSE                       0035  Close DOS File Handle       Example:                                                                             DOS:CLOSE                       0036  Close DOS File Handle                                                                                            DOS:CLOSE                       0037  Close DOS File Handle         ! S SFCLOSE,DSK                                                                    DOS:CLOSE                       0038  Close DOS File Handle         ! O FCLOSE,DSK                                                                     DOS:CLOSE                       0039  Close DOS File Handle         ! L T00,E                                                                          DOS:CLOSE                       0040  Close DOS File Handle         ! R QMONITOR                                                                       DOS:CLOSE                       0041  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0042  Close DOS File Handle         !==========  CLOSE DOS FILE HANDLE ==============================                  DOS:CLOSE                       0043  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0044  Close DOS File Handle         LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:CLOSE                       0045  Close DOS File Handle                    LOCAL FILEHANDLE$            ! Define file handle                       DOS:CLOSE                       0046  Close DOS File Handle         LENGTH 64 & LOCAL FILENAME$             ! Define file name                         DOS:CLOSE                       0047  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0048  Close DOS File Handle         LENGTH  3 & LOCAL DOSCODE$              ! Define DOS error code                    DOS:CLOSE                       0049  Close DOS File Handle         LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:CLOSE                       0050  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0051  Close DOS File Handle         100 FORMAT (ET)                         ! Screen format                            DOS:CLOSE                       0052  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0053  Close DOS File Handle         1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:CLOSE                       0054  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0055  Close DOS File Handle         CLEAR                                   ! Initialize variables                     DOS:CLOSE                       0056  Close DOS File Handle         PRINT (0,100)                           ! Set typewriter mode                      DOS:CLOSE                       0057  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0058  Close DOS File Handle         PRINT (0) "ENTER FILENAME TO OPEN:"     ! Display prompt                           DOS:CLOSE                       0059  Close DOS File Handle         INPUT (0) FILENAME$                     ! Enter file name                          DOS:CLOSE                       0060  Close DOS File Handle         IF FILENAME$ = "" THEN RUN "QMONITOR"   ! If null, then stop                       DOS:CLOSE                       0061  Close DOS File Handle         FILENAME$ = FILENAME$ + "@00@"          ! Add null byte to name                    DOS:CLOSE                       0062  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0063  Close DOS File Handle         AX$ = "@3D42@"                          ! Set AX to "OPEN FILE"                    DOS:CLOSE                       0064  Close DOS File Handle         CX$ = "@0000@"                          ! Set CX to null                           DOS:CLOSE                       0065  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0066  Close DOS File Handle         DOSFC(AX$,CX$,FILENAME$) EXCP=BRANCH1   ! Perform DOSFC call                       DOS:CLOSE                       0067  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0068  Close DOS File Handle         FILEHANDLE$ = AX$                       ! Save file handle                         DOS:CLOSE                       0069  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0070  Close DOS File Handle         PRINT (0) FILENAME$;" OPENED SUCCESSFULLY."                                        DOS:CLOSE                       0071  Close DOS File Handle         PRINT (0) "PRESS ENTER TO CLOSE THE FILE."                                         DOS:CLOSE                       0072  Close DOS File Handle         INPUT (0) ""                                                                       DOS:CLOSE                       0073  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0074  Close DOS File Handle         AX$ = "@3E00@"                          ! Set AX to "CLOSE FILE"                   DOS:CLOSE                       0075  Close DOS File Handle         BX$ = FILEHANDLE$                       ! Set BX to file handle                    DOS:CLOSE                       0076  Close DOS File Handle         CX$ = "@0000@"                          ! Set CX to null                           DOS:CLOSE                       0077  Close DOS File Handle         DX$ = "@0000@"                          ! Set DX to null                           DOS:CLOSE                       0078  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0079  Close DOS File Handle         DOSMS(AX$,BX$,CX$,DX$) EXCP=BRANCH2     ! Perform DOSMS call                       DOS:CLOSE                       0080  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0081  Close DOS File Handle         PRINT (0) FILENAME$;" CLOSED SUCCESSFULLY."                                        DOS:CLOSE                       0082  Close DOS File Handle         PRINT (0) "PRESS ENTER TO STOP."                                                   DOS:CLOSE                       0083  Close DOS File Handle         INPUT (0) ""                                                                       DOS:CLOSE                       0084  Close DOS File Handle         RUN "QMONITOR"                                                                     DOS:CLOSE                       0085  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0086  Close DOS File Handle         BRANCH1:                                ! Exception routine 1                      DOS:CLOSE                       0087  Close DOS File Handle         PRINT (0) "FILE NOT OPENED."            ! Display message                          DOS:CLOSE                       0088  Close DOS File Handle         OPEN (1) "QERCOMET"                     ! Open error file                          DOS:CLOSE                       0089  Close DOS File Handle         DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:CLOSE                       0090  Close DOS File Handle         READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:CLOSE                       0091  Close DOS File Handle         PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:CLOSE                       0092  Close DOS File Handle         PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:CLOSE                       0093  Close DOS File Handle         INPUT (0) ""                            ! Hold                                     DOS:CLOSE                       0094  Close DOS File Handle         CLOSE (1)                               ! Close error file                         DOS:CLOSE                       0095  Close DOS File Handle         RUN "QMONITOR"                          ! Exit                                     DOS:CLOSE                       0096  Close DOS File Handle         !                                                                                  DOS:CLOSE                       0097  Close DOS File Handle         BRANCH2:                                ! Exception routine 2                      DOS:CLOSE                       0098  Close DOS File Handle         PRINT (0) "FILE NOT CLOSED."            ! Display message                          DOS:CLOSE                       0099  Close DOS File Handle         OPEN (1) "QERCOMET"                     ! Open error file                          DOS:CLOSE                       0100  Close DOS File Handle         DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:CLOSE                       0101  Close DOS File Handle         READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:CLOSE                       0102  Close DOS File Handle         PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:CLOSE                       0103  Close DOS File Handle         PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:CLOSE                       0104  Close DOS File Handle         INPUT (0) ""                            ! Hold                                     DOS:CLOSE                       0105  Close DOS File Handle         CLOSE (1)                               ! Close error file                         DOS:CLOSE                       0106  Close DOS File Handle         RUN "QMONITOR"                          ! Exit                                     DOS:CLOSE                       0107  Close DOS File Handle         END                                                                                DOS:COPY                        0001  Copy a file                 Copy a file                                                                          DOS:COPY                        0002  Copy a file                 ===========                                                                          DOS:COPY                        0003  Copy a file                                                                                                      DOS:COPY                        0004  Copy a file                 Syntax:                                                                              DOS:COPY                        0005  Copy a file                                                                                                      DOS:COPY                        0006  Copy a file                   DOSRW(AX-value, BX-value, CX-value, DX-value)                                      DOS:COPY                        0007  Copy a file                        EXCP=statement-label                                                          DOS:COPY                        0008  Copy a file                                                                                                      DOS:COPY                        0009  Copy a file                 Entry:                                                                               DOS:COPY                        0010  Copy a file                                                                                                      DOS:COPY                        0011  Copy a file                   AX = "@FFFA@"                                                                      DOS:COPY                        0012  Copy a file                   BX =    0 (copy from the beginning of the file), or                                DOS:COPY                        0013  Copy a file                           1 (copy from the current location in the file)                             DOS:COPY                        0014  Copy a file                   CX = the source file handle                                                        DOS:COPY                        0015  Copy a file                   DX = the target file handle                                                        DOS:COPY                        0016  Copy a file                                                                                                      DOS:COPY                        0017  Copy a file                 Discussion:                                                                          DOS:COPY                        0018  Copy a file                                                                                                      DOS:COPY                        0019  Copy a file                   This pseudo function copies a file via DOS, providing a quick                      DOS:COPY                        0020  Copy a file                   copy. The copying can start at the beginning of the source file                    DOS:COPY                        0021  Copy a file                   or from the current location in the file. The source file can be                   DOS:COPY                        0022  Copy a file                   copied, merged, or appended to the target file.                                    DOS:CREATE                      0001  Create DOS File             Create DOS File                                                                      DOS:CREATE                      0002  Create DOS File             ===============                                                                      DOS:CREATE                      0003  Create DOS File                                                                                                  DOS:CREATE                      0004  Create DOS File             Syntax:                                                                              DOS:CREATE                      0005  Create DOS File                                                                                                  DOS:CREATE                      0006  Create DOS File               DOSFC(AX-value, CX-value, file-name) EXCP=statement-label                          DOS:CREATE                      0007  Create DOS File                                                                                                  DOS:CREATE                      0008  Create DOS File             Entry:                                                                               DOS:CREATE                      0009  Create DOS File                                                                                                  DOS:CREATE                      0010  Create DOS File               AX-value = "@3C00@"                                                                DOS:CREATE                      0011  Create DOS File               CX-value = "@0000@"                                                                DOS:CREATE                      0012  Create DOS File                                                                                                  DOS:CREATE                      0013  Create DOS File             Return:                                                                              DOS:CREATE                      0014  Create DOS File                                                                                                  DOS:CREATE                      0015  Create DOS File               If the function call is successful, the AX field will contain the                  DOS:CREATE                      0016  Create DOS File               file's handle.                                                                     DOS:CREATE                      0017  Create DOS File                                                                                                  DOS:CREATE                      0018  Create DOS File               If an exception occurs, byte 2 of the AX field will contain the                    DOS:CREATE                      0019  Create DOS File               DOS error code (in hex).                                                           DOS:CREATE                      0020  Create DOS File                                                                                                  DOS:CREATE                      0021  Create DOS File                                                                                                  DOS:CREATE                      0022  Create DOS File             Discussion:                                                                          DOS:CREATE                      0023  Create DOS File                                                                                                  DOS:CREATE                      0024  Create DOS File               The DOSFC function call can be used to create a DOS file. This                     DOS:CREATE                      0025  Create DOS File               call requires that the AX-value be set to "@3C00@", the CX-value                   DOS:CREATE                      0026  Create DOS File               to null, and the file-name to the name of the DOS file to be                       DOS:CREATE                      0027  Create DOS File               created (including disk and path name).                                            DOS:CREATE                      0028  Create DOS File                                                                                                  DOS:CREATE                      0029  Create DOS File               After the call is executed, the AX field will contain the file's                   DOS:CREATE                      0030  Create DOS File               handle. It is imperative that this value be stored for future use                  DOS:CREATE                      0031  Create DOS File               (i.e., for closing the file).                                                      DOS:CREATE                      0032  Create DOS File                                                                                                  DOS:CREATE                      0033  Create DOS File             Example:                                                                             DOS:CREATE                      0034  Create DOS File                                                                                                  DOS:CREATE                      0035  Create DOS File               ! S SFCREATE,DSK                                                                   DOS:CREATE                      0036  Create DOS File               ! O FCREATE,DSK                                                                    DOS:CREATE                      0037  Create DOS File               ! L T00,E                                                                          DOS:CREATE                      0038  Create DOS File               ! R QMONITOR                                                                       DOS:CREATE                      0039  Create DOS File               !                                                                                  DOS:CREATE                      0040  Create DOS File               !==========  CREATE DOS FILE  ===================================                  DOS:CREATE                      0041  Create DOS File               !                                                                                  DOS:CREATE                      0042  Create DOS File               LENGTH 2 & LOCAL AX$,CX$                ! Define registers                         DOS:CREATE                      0043  Create DOS File               LENGTH 2 & LOCAL FILEHANDLE$            ! Define file handle                       DOS:CREATE                      0044  Create DOS File               LENGTH 64 & LOCAL FILENAME$             ! Define file name                         DOS:CREATE                      0045  Create DOS File               !                                                                                  DOS:CREATE                      0046  Create DOS File               LENGTH  3 & LOCAL DOSCODE$              ! Define DOS error code                    DOS:CREATE                      0047  Create DOS File               LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:CREATE                      0048  Create DOS File               !                                                                                  DOS:CREATE                      0049  Create DOS File               1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:CREATE                      0050  Create DOS File               !                                                                                  DOS:CREATE                      0051  Create DOS File               100 FORMAT (ET)                         ! Screen format                            DOS:CREATE                      0052  Create DOS File               !                                                                                  DOS:CREATE                      0053  Create DOS File               CLEAR                                   ! Initialize variables                     DOS:CREATE                      0054  Create DOS File               PRINT (0,100)                           ! Set typewriter mode                      DOS:CREATE                      0055  Create DOS File               !                                                                                  DOS:CREATE                      0056  Create DOS File               PRINT (0) "ENTER FILENAME:"             ! Display prompt                           DOS:CREATE                      0057  Create DOS File               INPUT (0) FILENAME$                     ! Enter file name                          DOS:CREATE                      0058  Create DOS File               IF FILENAME$ = "" THEN RUN "QMONITOR"   ! If null, then stop                       DOS:CREATE                      0059  Create DOS File               FILENAME$ = FILENAME$ + "@00@"          ! Add null byte to name                    DOS:CREATE                      0060  Create DOS File               !                                                                                  DOS:CREATE                      0061  Create DOS File               AX$ = "@3C00@"                          ! Set AX to "CREATE FILE"                  DOS:CREATE                      0062  Create DOS File               CX$ = "@0000@"                          ! Set CX register to null                  DOS:CREATE                      0063  Create DOS File               !                                                                                  DOS:CREATE                      0064  Create DOS File               DOSFC(AX$,CX$,FILENAME$) EXCP=EXCEPTION ! Perform DOSFC call                       DOS:CREATE                      0065  Create DOS File               !                                                                                  DOS:CREATE                      0066  Create DOS File               FILEHANDLE$ = AX$                       ! Save file handle                         DOS:CREATE                      0067  Create DOS File               !                                                                                  DOS:CREATE                      0068  Create DOS File               PRINT (0) FILENAME$;" CREATED SUCCESSFULLY."                                       DOS:CREATE                      0069  Create DOS File               PRINT (0) "FILE HANDLE IS:";FILEHANDLE$                                            DOS:CREATE                      0070  Create DOS File               INPUT (0) ""                                                                       DOS:CREATE                      0071  Create DOS File               RUN "QMONITOR"                                                                     DOS:CREATE                      0072  Create DOS File               !                                                                                  DOS:CREATE                      0073  Create DOS File               EXCEPTION:                              ! Exception routine                        DOS:CREATE                      0074  Create DOS File               PRINT (0) "FILE NOT CREATED."           ! Display message                          DOS:CREATE                      0075  Create DOS File               OPEN (1) "QERCOMET"                     ! Open error file                          DOS:CREATE                      0076  Create DOS File               DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:CREATE                      0077  Create DOS File               READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:CREATE                      0078  Create DOS File               PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:CREATE                      0079  Create DOS File               PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:CREATE                      0080  Create DOS File               INPUT (0) ""                            ! Hold                                     DOS:CREATE                      0081  Create DOS File               CLOSE (1)                               ! Close error file                         DOS:CREATE                      0082  Create DOS File               RUN "QMONITOR"                          ! Exit                                     DOS:CREATE                      0083  Create DOS File               END                                                                                DOS:ERASE                       0001  Erase DOS File              Erase DOS File                                                                       DOS:ERASE                       0002  Erase DOS File              ==============                                                                       DOS:ERASE                       0003  Erase DOS File                                                                                                   DOS:ERASE                       0004  Erase DOS File              Syntax:                                                                              DOS:ERASE                       0005  Erase DOS File                                                                                                   DOS:ERASE                       0006  Erase DOS File                DOSFC(AX-value, CX-value, file-name) EXCP=statement-label                          DOS:ERASE                       0007  Erase DOS File                                                                                                   DOS:ERASE                       0008  Erase DOS File              Entry:                                                                               DOS:ERASE                       0009  Erase DOS File                                                                                                   DOS:ERASE                       0010  Erase DOS File                AX-value = "@4100@"                                                                DOS:ERASE                       0011  Erase DOS File                CX-value = "@0000@"                                                                DOS:ERASE                       0012  Erase DOS File                                                                                                   DOS:ERASE                       0013  Erase DOS File              Return:                                                                              DOS:ERASE                       0014  Erase DOS File                                                                                                   DOS:ERASE                       0015  Erase DOS File                If an exception occurs, byte 2 of the AX field will contain the                    DOS:ERASE                       0016  Erase DOS File                DOS error code (in hex).                                                           DOS:ERASE                       0017  Erase DOS File                                                                                                   DOS:ERASE                       0018  Erase DOS File              Discussion:                                                                          DOS:ERASE                       0019  Erase DOS File                                                                                                   DOS:ERASE                       0020  Erase DOS File                The DOSFC function call can be used to erase a DOS file. This                      DOS:ERASE                       0021  Erase DOS File                function requires that the AX-value be set to "@4100@", the CX-                    DOS:ERASE                       0022  Erase DOS File                value be set to null, and the file-name parameter be set to the                    DOS:ERASE                       0023  Erase DOS File                name of the DOS file to be erased (including disk and path name).                  DOS:ERASE                       0024  Erase DOS File                                                                                                   DOS:ERASE                       0025  Erase DOS File                After this function is executed, the file will be erased.                          DOS:ERASE                       0026  Erase DOS File                                                                                                   DOS:ERASE                       0027  Erase DOS File              Example:                                                                             DOS:ERASE                       0028  Erase DOS File                                                                                                   DOS:ERASE                       0029  Erase DOS File                ! S SFERASE,DSK                                                                    DOS:ERASE                       0030  Erase DOS File                ! O FERASE,DSK                                                                     DOS:ERASE                       0031  Erase DOS File                ! L T00,E                                                                          DOS:ERASE                       0032  Erase DOS File                ! R QMONITOR                                                                       DOS:ERASE                       0033  Erase DOS File                !                                                                                  DOS:ERASE                       0034  Erase DOS File                !==========  ERASE DOS FILE =====================================                  DOS:ERASE                       0035  Erase DOS File                !                                                                                  DOS:ERASE                       0036  Erase DOS File                LENGTH 2 & LOCAL AX$,CX$                ! Define registers                         DOS:ERASE                       0037  Erase DOS File                LENGTH 64 & LOCAL FILENAME$             ! Define file name                         DOS:ERASE                       0038  Erase DOS File                !                                                                                  DOS:ERASE                       0039  Erase DOS File                LENGTH  3 & LOCAL DOSCODE$              ! Define DOS error code                    DOS:ERASE                       0040  Erase DOS File                LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:ERASE                       0041  Erase DOS File                !                                                                                  DOS:ERASE                       0042  Erase DOS File                1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:ERASE                       0043  Erase DOS File                !                                                                                  DOS:ERASE                       0044  Erase DOS File                100 FORMAT (ET)                         ! Screen format                            DOS:ERASE                       0045  Erase DOS File                !                                                                                  DOS:ERASE                       0046  Erase DOS File                CLEAR                                   ! Initialize variables                     DOS:ERASE                       0047  Erase DOS File                PRINT (0,100)                           ! Set typewriter mode                      DOS:ERASE                       0048  Erase DOS File                !                                                                                  DOS:ERASE                       0049  Erase DOS File                PRINT (0) "ENTER FILENAME TO ERASE:"    ! Display prompt                           DOS:ERASE                       0050  Erase DOS File                INPUT (0) FILENAME$                     ! Enter file name                          DOS:ERASE                       0051  Erase DOS File                IF FILENAME$ = "" THEN RUN "QMONITOR"   ! If null, then stop                       DOS:ERASE                       0052  Erase DOS File                FILENAME$ = FILENAME$ + "@00@"          ! Add null byte to file                    DOS:ERASE                       0053  Erase DOS File                !                                                                                  DOS:ERASE                       0054  Erase DOS File                AX$ = "@4100@"                          ! Set AX to "ERASE FILE"                   DOS:ERASE                       0055  Erase DOS File                CX$ = "@0000@"                          ! Set CX register to null                  DOS:ERASE                       0056  Erase DOS File                !                                                                                  DOS:ERASE                       0057  Erase DOS File                DOSFC(AX$,CX$,FILENAME$) EXCP=EXCEPTION   ! Perform DOSFC call                     DOS:ERASE                       0058  Erase DOS File                !                                                                                  DOS:ERASE                       0059  Erase DOS File                PRINT (0) FILENAME$;" ERASED."                                                     DOS:ERASE                       0060  Erase DOS File                INPUT (0) ""                                                                       DOS:ERASE                       0061  Erase DOS File                RUN "QMONITOR"                                                                     DOS:ERASE                       0062  Erase DOS File                !                                                                                  DOS:ERASE                       0063  Erase DOS File                EXCEPTION:                              ! Exception routine                        DOS:ERASE                       0064  Erase DOS File                PRINT (0) "FILE NOT ERASED."            ! Display message                          DOS:ERASE                       0065  Erase DOS File                OPEN (1) "QERCOMET"                     ! Open error file                          DOS:ERASE                       0066  Erase DOS File                DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:ERASE                       0067  Erase DOS File                READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:ERASE                       0068  Erase DOS File                PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:ERASE                       0069  Erase DOS File                PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:ERASE                       0070  Erase DOS File                INPUT (0) ""                            ! Hold                                     DOS:ERASE                       0071  Erase DOS File                CLOSE (1)                               ! Close error file                         DOS:ERASE                       0072  Erase DOS File                RUN "QMONITOR"                          ! Exit                                     DOS:ERASE                       0073  Erase DOS File                END                                                                                DOS:ERASE                       0074  Erase DOS File                                                                                                   DOS:FIND                        0001  Find a string               Find a string                                                                        DOS:FIND                        0002  Find a string               =============                                                                        DOS:FIND                        0003  Find a string                                                                                                    DOS:FIND                        0004  Find a string               Syntax:                                                                              DOS:FIND                        0005  Find a string                                                                                                    DOS:FIND                        0006  Find a string                 DOSRW(AX-value, BX-value, CX-value, DX-value)                                      DOS:FIND                        0007  Find a string                      EXCP=statement-label                                                          DOS:FIND                        0008  Find a string                                                                                                    DOS:FIND                        0009  Find a string               Entry:                                                                               DOS:FIND                        0010  Find a string                                                                                                    DOS:FIND                        0011  Find a string                 AX = "@FFFC@"                                                                      DOS:FIND                        0012  Find a string                                                                                                    DOS:FIND                        0013  Find a string                    Upon execution of the DOSRW function, the AX register acts as                   DOS:FIND                        0014  Find a string                    a "countdown" field. If the number of occurrences of the                        DOS:FIND                        0015  Find a string                    search string is found, the value in this register is 0. A                      DOS:FIND                        0016  Find a string                    non-0 value means that an end-of-file was encountered before                    DOS:FIND                        0017  Find a string                    the specified number of occurrences were found.                                 DOS:FIND                        0018  Find a string                                                                                                    DOS:FIND                        0019  Find a string                 BX = file handle                                                                   DOS:FIND                        0020  Find a string                 CX = number of occurrences to find (in hex)                                        DOS:FIND                        0021  Find a string                 DX = the search string                                                             DOS:FIND                        0022  Find a string                                                                                                    DOS:FIND                        0023  Find a string               Discussion:                                                                          DOS:FIND                        0024  Find a string                                                                                                    DOS:FIND                        0025  Find a string                 This pseudo function searches an entire file for a specified                       DOS:FIND                        0026  Find a string                 string in forward record order (physical order). If the string is                  DOS:FIND                        0027  Find a string                 found anywhere within the file, the file pointer is positioned at                  DOS:FIND                        0028  Find a string                 the physical record where the string was found.                                    DOS:FIND                        0029  Find a string                                                                                                    DOS:FIND                        0030  Find a string                 The search starts at current position in the file.                                 DOS:FINDREVERSE                 0001  Find a string -- reverse    Find a string -- reverse                                                             DOS:FINDREVERSE                 0002  Find a string -- reverse    ========================                                                             DOS:FINDREVERSE                 0003  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0004  Find a string -- reverse    Syntax:                                                                              DOS:FINDREVERSE                 0005  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0006  Find a string -- reverse      DOSRW(AX-value, BX-value, CX-value, DX-value)                                      DOS:FINDREVERSE                 0007  Find a string -- reverse           EXCP=statement-label                                                          DOS:FINDREVERSE                 0008  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0009  Find a string -- reverse    Entry:                                                                               DOS:FINDREVERSE                 0010  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0011  Find a string -- reverse      AX = "@FFFB@"                                                                      DOS:FINDREVERSE                 0012  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0013  Find a string -- reverse         Upon execution of the DOSRW function, the AX register acts as                   DOS:FINDREVERSE                 0014  Find a string -- reverse         a "countdown" field. If the number of occurrences of the                        DOS:FINDREVERSE                 0015  Find a string -- reverse         search string is found, the value in this register is 0. A                      DOS:FINDREVERSE                 0016  Find a string -- reverse         non-0 value means that a beginning-of-file was encountered                      DOS:FINDREVERSE                 0017  Find a string -- reverse         before the specified number of occurrences were found.                          DOS:FINDREVERSE                 0018  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0019  Find a string -- reverse      BX = file handle                                                                   DOS:FINDREVERSE                 0020  Find a string -- reverse      CX = number of occurrences to find (in hex)                                        DOS:FINDREVERSE                 0021  Find a string -- reverse      DX = the search string                                                             DOS:FINDREVERSE                 0022  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0023  Find a string -- reverse    Discussion:                                                                          DOS:FINDREVERSE                 0024  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0025  Find a string -- reverse      This pseudo function searches an entire file for a specified                       DOS:FINDREVERSE                 0026  Find a string -- reverse      string in reverse record order (physical order). If the string is                  DOS:FINDREVERSE                 0027  Find a string -- reverse      found anywhere within the file, the file pointer is positioned at                  DOS:FINDREVERSE                 0028  Find a string -- reverse      the physical record where the string was found.                                    DOS:FINDREVERSE                 0029  Find a string -- reverse                                                                                         DOS:FINDREVERSE                 0030  Find a string -- reverse      The search starts at current position in the file.                                 DOS:GETDATE                     0001  Get DOS Date                Get DOS Date                                                                         DOS:GETDATE                     0002  Get DOS Date                ============                                                                         DOS:GETDATE                     0003  Get DOS Date                                                                                                     DOS:GETDATE                     0004  Get DOS Date                Syntax:                                                                              DOS:GETDATE                     0005  Get DOS Date                                                                                                     DOS:GETDATE                     0006  Get DOS Date                  DOSMS(AX-value,BX-value,CX-value,DX-value) EXCP=statement-label                    DOS:GETDATE                     0007  Get DOS Date                                                                                                     DOS:GETDATE                     0008  Get DOS Date                Entry:                                                                               DOS:GETDATE                     0009  Get DOS Date                                                                                                     DOS:GETDATE                     0010  Get DOS Date                  AX-value = "@2A00@"                                                                DOS:GETDATE                     0011  Get DOS Date                  BX-value = "@0000@"                                                                DOS:GETDATE                     0012  Get DOS Date                  CX-value = "@0000@"                                                                DOS:GETDATE                     0013  Get DOS Date                  DX-value = "@0000@"                                                                DOS:GETDATE                     0014  Get DOS Date                                                                                                     DOS:GETDATE                     0015  Get DOS Date                Return:                                                                              DOS:GETDATE                     0016  Get DOS Date                                                                                                     DOS:GETDATE                     0017  Get DOS Date                  The CX register contains the year (1980 to 2099; in hex -- see                     DOS:GETDATE                     0018  Get DOS Date                  conversion note below).                                                            DOS:GETDATE                     0019  Get DOS Date                                                                                                     DOS:GETDATE                     0020  Get DOS Date                  Byte 2 of the DX register (i.e., the DH byte) contains the month                   DOS:GETDATE                     0021  Get DOS Date                  (1 to 12; in hex).                                                                 DOS:GETDATE                     0022  Get DOS Date                                                                                                     DOS:GETDATE                     0023  Get DOS Date                  Byte 1 of the DX register (i.e., the DL byte) contains the day (1                  DOS:GETDATE                     0024  Get DOS Date                  to 31; in hex).                                                                    DOS:GETDATE                     0025  Get DOS Date                                                                                                     DOS:GETDATE                     0026  Get DOS Date                  Byte 1 of the AX register (i.e., the AL byte) contains the                         DOS:GETDATE                     0027  Get DOS Date                  weekday number (0 = Sunday, 1 = Monday, 2 = Tuesday, etc.; in                      DOS:GETDATE                     0028  Get DOS Date                  hex).                                                                              DOS:GETDATE                     0029  Get DOS Date                                                                                                     DOS:GETDATE                     0030  Get DOS Date                Discussion:                                                                          DOS:GETDATE                     0031  Get DOS Date                                                                                                     DOS:GETDATE                     0032  Get DOS Date                  The DOSMS function call can be used to get the DOS system date.                    DOS:GETDATE                     0033  Get DOS Date                  This function requires that the AX-value be set to "@2A00@", and                   DOS:GETDATE                     0034  Get DOS Date                  that the other entry values be set to null.                                        DOS:GETDATE                     0035  Get DOS Date                                                                                                     DOS:GETDATE                     0036  Get DOS Date                  After the function is executed, the DOS date is returned in the                    DOS:GETDATE                     0037  Get DOS Date                  registers as described above. Note that the values are returned                    DOS:GETDATE                     0038  Get DOS Date                  in hex and must be converted to decimal for meaningful use.                        DOS:GETDATE                     0039  Get DOS Date                                                                                                     DOS:GETDATE                     0040  Get DOS Date                  Special note: The CX register returns the year portion of the DOS                  DOS:GETDATE                     0041  Get DOS Date                  system date. In order to get the correct year, you must first                      DOS:GETDATE                     0042  Get DOS Date                  reverse the order of the bytes in the CX register, and then                        DOS:GETDATE                     0043  Get DOS Date                  convert to decimal. This is demonstrated in the following sample                   DOS:GETDATE                     0044  Get DOS Date                  program.                                                                           DOS:GETDATE                     0045  Get DOS Date                                                                                                     DOS:GETDATE                     0046  Get DOS Date                Example:                                                                             DOS:GETDATE                     0047  Get DOS Date                                                                                                     DOS:GETDATE                     0048  Get DOS Date                  ! S SDATE,DSK                                                                      DOS:GETDATE                     0049  Get DOS Date                  ! O DATE,DSK                                                                       DOS:GETDATE                     0050  Get DOS Date                  ! L T00,E                                                                          DOS:GETDATE                     0051  Get DOS Date                  ! R QMONITOR                                                                       DOS:GETDATE                     0052  Get DOS Date                  !                                                                                  DOS:GETDATE                     0053  Get DOS Date                  !==========  GET DOS DATE =======================================                  DOS:GETDATE                     0054  Get DOS Date                  !                                                                                  DOS:GETDATE                     0055  Get DOS Date                  LENGTH 2 & LOCAL AX$,BX$,CX$,DX$          ! Define registers                       DOS:GETDATE                     0056  Get DOS Date                             LOCAL MONTH$,DAYNUM$,WEEKDAY$  ! Define date variables                  DOS:GETDATE                     0057  Get DOS Date                  LENGTH 4 & LOCAL YEAR$                    ! Define year                            DOS:GETDATE                     0058  Get DOS Date                  LENGTH 1 & LOCAL AL$,CH$,CL$,DH$,DL$      ! Define sub-registers                   DOS:GETDATE                     0059  Get DOS Date                  LENGTH 4.0 & LOCAL YEAR                   ! Define numeric year                    DOS:GETDATE                     0060  Get DOS Date                  LENGTH 2.0 & LOCAL MONTH,DAYNUM,WEEKDAY   ! Define numeric dates                   DOS:GETDATE                     0061  Get DOS Date                  !                                                                                  DOS:GETDATE                     0062  Get DOS Date                  100 FORMAT (ET)                           ! Screen format                          DOS:GETDATE                     0063  Get DOS Date                  !                                                                                  DOS:GETDATE                     0064  Get DOS Date                  CLEAR                        ! Initialize all variables                            DOS:GETDATE                     0065  Get DOS Date                  !                                                                                  DOS:GETDATE                     0066  Get DOS Date                  AX$="@2A00@"                 ! Set AX register for "GET DATE"                      DOS:GETDATE                     0067  Get DOS Date                  BX$="@0000@"                 ! Set BX register to null                             DOS:GETDATE                     0068  Get DOS Date                  CX$="@0000@"                 ! Set CX register to null                             DOS:GETDATE                     0069  Get DOS Date                  DX$="@0000@"                 ! Set DX register to null                             DOS:GETDATE                     0070  Get DOS Date                  !                                                                                  DOS:GETDATE                     0071  Get DOS Date                  DOSMS(AX$,BX$,CX$,DX$)       ! Perform DOSMS system call                           DOS:GETDATE                     0072  Get DOS Date                  !                                                                                  DOS:GETDATE                     0073  Get DOS Date                  YEAR$ = CX$                  ! Year (hex) = CX register                            DOS:GETDATE                     0074  Get DOS Date                  MONTH$= SUB(DX$,2,1)         ! Month (hex) = DH byte of DX                         DOS:GETDATE                     0075  Get DOS Date                  DAYNUM$= SUB(DX$,1,1)        ! Day (hex) = DL byte of DX register                  DOS:GETDATE                     0076  Get DOS Date                  WEEKDAY$=SUB(AX$,1,1)        ! Weekday (hex) = AL byte of AX                       DOS:GETDATE                     0077  Get DOS Date                  !                                                                                  DOS:GETDATE                     0078  Get DOS Date                  CH$ = SUB(CX$,2,1)           ! Get CH byte from CX (year)                          DOS:GETDATE                     0079  Get DOS Date                  CL$ = SUB(CX$,1,1)           ! Get CL byte from CX (year)                          DOS:GETDATE                     0080  Get DOS Date                  YEAR$ = CH$ + CL$            ! Recombine CH and CL bytes                           DOS:GETDATE                     0081  Get DOS Date                  !                                                                                  DOS:GETDATE                     0082  Get DOS Date                  MONTH$   = "@00@" + MONTH$   ! Add leading null byte to MONTH$                     DOS:GETDATE                     0083  Get DOS Date                  DAYNUM$  = "@00@" + DAYNUM$  ! Add leading null byte to DAYNUM$                    DOS:GETDATE                     0084  Get DOS Date                  WEEKDAY$ = "@00@" + WEEKDAY$ ! Add leading null byte to WEEKDAY$                   DOS:GETDATE                     0085  Get DOS Date                  !                                                                                  DOS:GETDATE                     0086  Get DOS Date                  YEAR = HEXDEC(YEAR$)         ! Convert hex YEAR$ to decimal YEAR                   DOS:GETDATE                     0087  Get DOS Date                  MONTH= HEXDEC(MONTH$)        ! Convert hex MONTH$ to decimal                       DOS:GETDATE                     0088  Get DOS Date                  DAYNUM = HEXDEC(DAYNUM$)     ! Convert hex DAYNUM$ to decimal                      DOS:GETDATE                     0089  Get DOS Date                  WEEKDAY= HEXDEC(WEEKDAY$)    ! Convert hex WEEKDAY$ to decimal                     DOS:GETDATE                     0090  Get DOS Date                  !                                                                                  DOS:GETDATE                     0091  Get DOS Date                  PRINT (0,100)                ! Set typewriter mode                                 DOS:GETDATE                     0092  Get DOS Date                  !                                                                                  DOS:GETDATE                     0093  Get DOS Date                  PRINT (0) "YEAR:      ";YEAR                                                       DOS:GETDATE                     0094  Get DOS Date                  PRINT (0) "MONTH:     ";MONTH                                                      DOS:GETDATE                     0095  Get DOS Date                  PRINT (0) "DAY        ";DAYNUM                                                     DOS:GETDATE                     0096  Get DOS Date                  PRINT (0) "WEEKDAY # :";WEEKDAY                                                    DOS:GETDATE                     0097  Get DOS Date                  INPUT (0) ""                                                                       DOS:GETDATE                     0098  Get DOS Date                  RUN "QMONITOR"                                                                     DOS:GETDATE                     0099  Get DOS Date                  END                                                                                DOS:GETTIME                     0001  Get DOS Time                Get DOS Time                                                                         DOS:GETTIME                     0002  Get DOS Time                ============                                                                         DOS:GETTIME                     0003  Get DOS Time                                                                                                     DOS:GETTIME                     0004  Get DOS Time                Syntax:                                                                              DOS:GETTIME                     0005  Get DOS Time                                                                                                     DOS:GETTIME                     0006  Get DOS Time                  DOSMS(AX-value,BX-value,CX-value,DX-value) EXCP=statement-label                    DOS:GETTIME                     0007  Get DOS Time                                                                                                     DOS:GETTIME                     0008  Get DOS Time                Entry:                                                                               DOS:GETTIME                     0009  Get DOS Time                                                                                                     DOS:GETTIME                     0010  Get DOS Time                  AX-value = "@2C00@"                                                                DOS:GETTIME                     0011  Get DOS Time                  BX-value = "@0000@"                                                                DOS:GETTIME                     0012  Get DOS Time                  CX-value = "@0000@"                                                                DOS:GETTIME                     0013  Get DOS Time                  DX-value = "@0000@"                                                                DOS:GETTIME                     0014  Get DOS Time                                                                                                     DOS:GETTIME                     0015  Get DOS Time                Return:                                                                              DOS:GETTIME                     0016  Get DOS Time                                                                                                     DOS:GETTIME                     0017  Get DOS Time                  Byte 2 of the CX register (i.e., the CH byte) contains the hour                    DOS:GETTIME                     0018  Get DOS Time                  (0 to 23; in hex).                                                                 DOS:GETTIME                     0019  Get DOS Time                                                                                                     DOS:GETTIME                     0020  Get DOS Time                  Byte 1 of the CX register (i.e., the CL byte) contains the minute                  DOS:GETTIME                     0021  Get DOS Time                  (0 to 59; in hex).                                                                 DOS:GETTIME                     0022  Get DOS Time                                                                                                     DOS:GETTIME                     0023  Get DOS Time                  Byte 2 of the DX register (i.e., the DH byte) contains the second                  DOS:GETTIME                     0024  Get DOS Time                  (0 to 59; in hex).                                                                 DOS:GETTIME                     0025  Get DOS Time                                                                                                     DOS:GETTIME                     0026  Get DOS Time                  Byte 1 of the DX register (i.e., the DL byte) contains the                         DOS:GETTIME                     0027  Get DOS Time                  hundredths of seconds (0 to 99; in hex).                                           DOS:GETTIME                     0028  Get DOS Time                                                                                                     DOS:GETTIME                     0029  Get DOS Time                Discussion:                                                                          DOS:GETTIME                     0030  Get DOS Time                                                                                                     DOS:GETTIME                     0031  Get DOS Time                  The DOSMS function call can be used to get the DOS system time.                    DOS:GETTIME                     0032  Get DOS Time                  This function requires that the AX-value be set to "@2C00@", and                   DOS:GETTIME                     0033  Get DOS Time                  that the other entry values be set to null.                                        DOS:GETTIME                     0034  Get DOS Time                                                                                                     DOS:GETTIME                     0035  Get DOS Time                  After the function is executed, the DOS time is returned in the                    DOS:GETTIME                     0036  Get DOS Time                  registers as described above. Note that the values are returned                    DOS:GETTIME                     0037  Get DOS Time                  in hex and must be converted to decimal for meaningful use.                        DOS:GETTIME                     0038  Get DOS Time                                                                                                     DOS:GETTIME                     0039  Get DOS Time                Example:                                                                             DOS:GETTIME                     0040  Get DOS Time                                                                                                     DOS:GETTIME                     0041  Get DOS Time                  ! S STIME,DSK                                                                      DOS:GETTIME                     0042  Get DOS Time                  ! O TIME,DSK                                                                       DOS:GETTIME                     0043  Get DOS Time                  ! L T00,E                                                                          DOS:GETTIME                     0044  Get DOS Time                  ! R QMONITOR                                                                       DOS:GETTIME                     0045  Get DOS Time                  !                                                                                  DOS:GETTIME                     0046  Get DOS Time                  !==========  GET DOS TIME =======================================                  DOS:GETTIME                     0047  Get DOS Time                  !                                                                                  DOS:GETTIME                     0048  Get DOS Time                  LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:GETTIME                     0049  Get DOS Time                             LOCAL HOUR$,MIN$,SEC$,HUND$  ! Define time variables                    DOS:GETTIME                     0050  Get DOS Time                  LENGTH 1 & LOCAL CH$,CL$,DH$,DL$        ! Define sub-registers                     DOS:GETTIME                     0051  Get DOS Time                  LENGTH 2.0 & LOCAL HOUR,MIN,SEC,HUND    ! Define numeric times                     DOS:GETTIME                     0052  Get DOS Time                  !                                                                                  DOS:GETTIME                     0053  Get DOS Time                  100 FORMAT (ET)                         ! Screen format                            DOS:GETTIME                     0054  Get DOS Time                  !                                                                                  DOS:GETTIME                     0055  Get DOS Time                  CLEAR                        ! Initialize all variables                            DOS:GETTIME                     0056  Get DOS Time                  !                                                                                  DOS:GETTIME                     0057  Get DOS Time                  AX$="@2C00@"                 ! Set AX register for "GET TIME"                      DOS:GETTIME                     0058  Get DOS Time                  BX$="@0000@"                 ! Set BX register to null                             DOS:GETTIME                     0059  Get DOS Time                  CX$="@0000@"                 ! Set CX register to null                             DOS:GETTIME                     0060  Get DOS Time                  DX$="@0000@"                 ! Set DX register to null                             DOS:GETTIME                     0061  Get DOS Time                  !                                                                                  DOS:GETTIME                     0062  Get DOS Time                  DOSMS(AX$,BX$,CX$,DX$)       ! Perform DOSMS system call                           DOS:GETTIME                     0063  Get DOS Time                  !                                                                                  DOS:GETTIME                     0064  Get DOS Time                  HOUR$ = SUB(CX$,2,1)         ! Hour (hex) = CH byte of CX                          DOS:GETTIME                     0065  Get DOS Time                  MIN$  = SUB(CX$,1,1)         ! Minute (hex) = CL byte of CX                        DOS:GETTIME                     0066  Get DOS Time                  SEC$  = SUB(DX$,2,1)         ! Second (HEX) = DH byte of DX                        DOS:GETTIME                     0067  Get DOS Time                  HUND$ = SUB(DX$,1,1)         ! Hundredths (hex) = DL byte of DX                    DOS:GETTIME                     0068  Get DOS Time                  !                                                                                  DOS:GETTIME                     0069  Get DOS Time                  HOUR$ = "@00@" + HOUR$       ! Add leading null byte to HOUR$                      DOS:GETTIME                     0070  Get DOS Time                  MIN$  = "@00@" + MIN$        ! Add leading null byte to MIN$                       DOS:GETTIME                     0071  Get DOS Time                  SEC$  = "@00@" + SEC$        ! Add leading null byte to SEC$                       DOS:GETTIME                     0072  Get DOS Time                  HUND$ = "@00@" + HUND$       ! Add leading null byte to HUND$                      DOS:GETTIME                     0073  Get DOS Time                  !                                                                                  DOS:GETTIME                     0074  Get DOS Time                  HOUR = HEXDEC(HOUR$)         ! Convert hex HOUR$ to decimal HOUR                   DOS:GETTIME                     0075  Get DOS Time                  MIN  = HEXDEC(MIN$)          ! Convert hex MIN$ to decimal MIN                     DOS:GETTIME                     0076  Get DOS Time                  SEC  = HEXDEC(SEC$)          ! Convert hex SEC$ to decimal SEC                     DOS:GETTIME                     0077  Get DOS Time                  HUND = HEXDEC(HUND$)         ! Convert hex HUND$ to decimal HUND$                  DOS:GETTIME                     0078  Get DOS Time                  !                                                                                  DOS:GETTIME                     0079  Get DOS Time                  PRINT (0,100)                ! Set typewriter mode                                 DOS:GETTIME                     0080  Get DOS Time                  !                                                                                  DOS:GETTIME                     0081  Get DOS Time                  PRINT (0) "HOUR:      ";HOUR                                                       DOS:GETTIME                     0082  Get DOS Time                  PRINT (0) "MINUTE:    ";MIN                                                        DOS:GETTIME                     0083  Get DOS Time                  PRINT (0) "SECONDS:   ";SEC                                                        DOS:GETTIME                     0084  Get DOS Time                  PRINT (0) "HUNDREDTHS:";HUND                                                       DOS:GETTIME                     0085  Get DOS Time                  INPUT (0) ""                                                                       DOS:GETTIME                     0086  Get DOS Time                  RUN "QMONITOR"                                                                     DOS:GETTIME                     0087  Get DOS Time                  END                                                                                DOS:LSEEK                       0001  Move File Read/Write PointerMove File Read/Write Pointer (LSEEK)                                                 DOS:LSEEK                       0002  Move File Read/Write Pointer====================================                                                 DOS:LSEEK                       0003  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0004  Move File Read/Write PointerSyntax:                                                                              DOS:LSEEK                       0005  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0006  Move File Read/Write Pointer  DOSMS(AX-value,BX-value,CX-value,DX-value) EXCP=statement-label                    DOS:LSEEK                       0007  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0008  Move File Read/Write PointerEntry:                                                                               DOS:LSEEK                       0009  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0010  Move File Read/Write Pointer  AX-value = "@4200@"    (move from beginning of file)                               DOS:LSEEK                       0011  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0012  Move File Read/Write Pointer  (or)                                                                               DOS:LSEEK                       0013  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0014  Move File Read/Write Pointer  AX-value = "@4201@"    (move from current pointer location)                        DOS:LSEEK                       0015  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0016  Move File Read/Write Pointer  (or)                                                                               DOS:LSEEK                       0017  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0018  Move File Read/Write Pointer  AX-value = "@4202@"    (move from end of file)                                     DOS:LSEEK                       0019  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0020  Move File Read/Write Pointer  BX-value = file handle (from previous open)                                        DOS:LSEEK                       0021  Move File Read/Write Pointer  CX-value = most significant portion of offset (in hex)                             DOS:LSEEK                       0022  Move File Read/Write Pointer  DX-value = least significant portion of offset (in hex)                            DOS:LSEEK                       0023  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0024  Move File Read/Write PointerReturn:                                                                              DOS:LSEEK                       0025  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0026  Move File Read/Write Pointer  If the function call is successful, the DX and AX fields will                      DOS:LSEEK                       0027  Move File Read/Write Pointer  contain the file pointer's new location (in hex). Values less                      DOS:LSEEK                       0028  Move File Read/Write Pointer  than or equal to 65,535 (64K bytes) will be stored in the field                    DOS:LSEEK                       0029  Move File Read/Write Pointer  AX. If the pointer value exceeds 65,536, the DX-value will                         DOS:LSEEK                       0030  Move File Read/Write Pointer  contain the larger portion and the AX value will contain the                       DOS:LSEEK                       0031  Move File Read/Write Pointer  smaller portion.                                                                   DOS:LSEEK                       0032  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0033  Move File Read/Write Pointer  If an exception occurs, byte 2 of the AX field will contain the                    DOS:LSEEK                       0034  Move File Read/Write Pointer  DOS error code (in hex).                                                           DOS:LSEEK                       0035  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0036  Move File Read/Write PointerDiscussion:                                                                          DOS:LSEEK                       0037  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0038  Move File Read/Write Pointer  The DOSMS function call can be used to move the read/write                         DOS:LSEEK                       0039  Move File Read/Write Pointer  pointer in a DOS file. This function is also known as LSEEK. This                  DOS:LSEEK                       0040  Move File Read/Write Pointer  call requires that the AX-value be set according to the type of                    DOS:LSEEK                       0041  Move File Read/Write Pointer  move desired. The first byte of AX will always be hex 42, while                    DOS:LSEEK                       0042  Move File Read/Write Pointer  the second byte is set according to the following chart:                           DOS:LSEEK                       0043  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0044  Move File Read/Write Pointer  Value   Type of move                                                               DOS:LSEEK                       0045  Move File Read/Write Pointer  =================================================================                  DOS:LSEEK                       0046  Move File Read/Write Pointer  00      Move relative to the beginning of the file                                 DOS:LSEEK                       0047  Move File Read/Write Pointer  01      Move relative to the current position of the file pointer                  DOS:LSEEK                       0048  Move File Read/Write Pointer  02      Move from the end of the file.                                             DOS:LSEEK                       0049  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0050  Move File Read/Write Pointer  For example, to move the pointer relative to the beginning of the                  DOS:LSEEK                       0051  Move File Read/Write Pointer  file, the AX-value should equal "@4200@".                                          DOS:LSEEK                       0052  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0053  Move File Read/Write Pointer  The BX-value should contain the file's handle. This value is                       DOS:LSEEK                       0054  Move File Read/Write Pointer  established when the file is opened.                                               DOS:LSEEK                       0055  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0056  Move File Read/Write Pointer  The CX and DX values should contain the offset value (in hex).                     DOS:LSEEK                       0057  Move File Read/Write Pointer  The offset is the positive number of bytes the pointer is to be                    DOS:LSEEK                       0058  Move File Read/Write Pointer  moved. The DX-value contains the least significant portion of the                  DOS:LSEEK                       0059  Move File Read/Write Pointer  offset, while the CX-value contains the most significant portion.                  DOS:LSEEK                       0060  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0061  Move File Read/Write Pointer  After the call is executed, the file pointer will be re-                           DOS:LSEEK                       0062  Move File Read/Write Pointer  positioned in the DOS file. Its new position is a function of the                  DOS:LSEEK                       0063  Move File Read/Write Pointer  type of move specified, the offset specified, and the original                     DOS:LSEEK                       0064  Move File Read/Write Pointer  location of the file pointer.                                                      DOS:LSEEK                       0065  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0066  Move File Read/Write Pointer  For example, to move the pointer 100 bytes forward from its                        DOS:LSEEK                       0067  Move File Read/Write Pointer  current location, you would:                                                       DOS:LSEEK                       0068  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0069  Move File Read/Write Pointer  1. Set the AX-value to "@4201@" (move relative to current                          DOS:LSEEK                       0070  Move File Read/Write Pointer     position)                                                                       DOS:LSEEK                       0071  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0072  Move File Read/Write Pointer  2. Set the BX-value to the file's handle                                           DOS:LSEEK                       0073  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0074  Move File Read/Write Pointer  3. Set the CX-value to null (not used in this example)                             DOS:LSEEK                       0075  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0076  Move File Read/Write Pointer  4. Set the DX-value to "@0064@" (the hex equivalent of 100)                        DOS:LSEEK                       0077  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0078  Move File Read/Write Pointer  5. Execute the DOSMS function call                                                 DOS:LSEEK                       0079  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0080  Move File Read/Write Pointer  Notes:                                                                             DOS:LSEEK                       0081  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0082  Move File Read/Write Pointer  a. If the offset value exceeds 65,536 (64K bytes), the CX-value                    DOS:LSEEK                       0083  Move File Read/Write Pointer     may be used to contain the larger portion. Otherwise, CX                        DOS:LSEEK                       0084  Move File Read/Write Pointer     remains null and DX is used to set the offset value.                            DOS:LSEEK                       0085  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0086  Move File Read/Write Pointer  b. If you move the pointer past the end of the file, it will be                    DOS:LSEEK                       0087  Move File Read/Write Pointer     positioned at the new location, logically extending the length                  DOS:LSEEK                       0088  Move File Read/Write Pointer     of the file to the new position.                                                DOS:LSEEK                       0089  Move File Read/Write Pointer                                                                                     DOS:LSEEK                       0090  Move File Read/Write Pointer  c. If you position the pointer within the file (i.e., not past                     DOS:LSEEK                       0091  Move File Read/Write Pointer     the end of file) and then write zero bytes to the file, the                     DOS:LSEEK                       0092  Move File Read/Write Pointer     file will be truncated and the remaining data will be lost.                     DOS:LSEEK                       0093  Move File Read/Write Pointer     The new end of file will be the position of the pointer before                  DOS:LSEEK                       0094  Move File Read/Write Pointer     the zero-byte write.                                                            DOS:MESSAGE                     0001  Send a Message to Another TeSend a Message to Another Terminal                                                   DOS:MESSAGE                     0002  Send a Message to Another Te==================================                                                   DOS:MESSAGE                     0003  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0004  Send a Message to Another TeSyntax:                                                                              DOS:MESSAGE                     0005  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0006  Send a Message to Another Te  DOSRW(AX-value, terminal-number, number-of-bytes,                                  DOS:MESSAGE                     0007  Send a Message to Another Te     format-statement-label) EXCP=statement-label                                    DOS:MESSAGE                     0008  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0009  Send a Message to Another TeEntry:                                                                               DOS:MESSAGE                     0010  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0011  Send a Message to Another Te  AX-value = "@FFFF@"                                                                DOS:MESSAGE                     0012  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0013  Send a Message to Another Te  terminal-number = terminal where the message is to be sent                         DOS:MESSAGE                     0014  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0015  Send a Message to Another Te  number-of-bytes = number of characters to be written to another                    DOS:MESSAGE                     0016  Send a Message to Another Te  terminal                                                                           DOS:MESSAGE                     0017  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0018  Send a Message to Another Te  format-statement-label = format statement containing the message                   DOS:MESSAGE                     0019  Send a Message to Another Te  to be written to the other terminal (may be a constant or                          DOS:MESSAGE                     0020  Send a Message to Another Te  variable)                                                                          DOS:MESSAGE                     0021  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0022  Send a Message to Another TeReturn:                                                                              DOS:MESSAGE                     0023  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0024  Send a Message to Another Te  If the write function is successful, the message  contained in                     DOS:MESSAGE                     0025  Send a Message to Another Te  the format statement will be sent to the terminal specified.                       DOS:MESSAGE                     0026  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0027  Send a Message to Another Te  If an exception occurs, byte 2 of the AX field will contain the                    DOS:MESSAGE                     0028  Send a Message to Another Te  DOS error code (in hex).                                                           DOS:MESSAGE                     0029  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0030  Send a Message to Another TeDiscussion:                                                                          DOS:MESSAGE                     0031  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0032  Send a Message to Another Te  The DOSRW function can be used to send a message to another                        DOS:MESSAGE                     0033  Send a Message to Another Te  terminal on the Comet system. The message to be sent is contained                  DOS:MESSAGE                     0034  Send a Message to Another Te  in an MTB format statement. The message may be a string constant                   DOS:MESSAGE                     0035  Send a Message to Another Te  or a string variable.                                                              DOS:MESSAGE                     0036  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0037  Send a Message to Another Te  This function requires that the AX-value be set to "@FFFF@".                       DOS:MESSAGE                     0038  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0039  Send a Message to Another Te  The second parameter in this function call is the terminal number                  DOS:MESSAGE                     0040  Send a Message to Another Te  of the terminal receiving the message. This may be a string                        DOS:MESSAGE                     0041  Send a Message to Another Te  constant or variable in the standard Comet form (for example,                      DOS:MESSAGE                     0042  Send a Message to Another Te  T00, T05, T12). To send a message to all terminals, this string                    DOS:MESSAGE                     0043  Send a Message to Another Te  should be "ALL".                                                                   DOS:MESSAGE                     0044  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0045  Send a Message to Another Te  The third parameter contains the number of bytes to be written to                  DOS:MESSAGE                     0046  Send a Message to Another Te  the receiving terminal. This must be a constant value hard-coded                   DOS:MESSAGE                     0047  Send a Message to Another Te  into the function call (i.e., it may not be a variable).                           DOS:MESSAGE                     0048  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0049  Send a Message to Another Te  The fourth parameter, the format-statement-label, is the label of                  DOS:MESSAGE                     0050  Send a Message to Another Te  a FORMAT statement containing the appropriate control codes to                     DOS:MESSAGE                     0051  Send a Message to Another Te  place the message at the desired location on the receiving                         DOS:MESSAGE                     0052  Send a Message to Another Te  terminal. For example, to display a message on the bottom line                     DOS:MESSAGE                     0053  Send a Message to Another Te  (i.e., the message line), you should include the hex control                       DOS:MESSAGE                     0054  Send a Message to Another Te  "@0E07@" at the beginning of the format statement.                                 DOS:MESSAGE                     0055  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0056  Send a Message to Another Te  Also see <Sending a Message to All Terminals|DOS:MESSAGEALL>.                      DOS:MESSAGE                     0057  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0058  Send a Message to Another TeExample:                                                                             DOS:MESSAGE                     0059  Send a Message to Another Te                                                                                     DOS:MESSAGE                     0060  Send a Message to Another Te  ! S SMESSAGE,DSK                                                                   DOS:MESSAGE                     0061  Send a Message to Another Te  ! O MESSAGE,DSK                                                                    DOS:MESSAGE                     0062  Send a Message to Another Te  ! L T00,E                                                                          DOS:MESSAGE                     0063  Send a Message to Another Te  ! R QMONITOR                                                                       DOS:MESSAGE                     0064  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0065  Send a Message to Another Te  !==========  SEND MESSAGE TO ANOTHER TERMINAL  ==================                  DOS:MESSAGE                     0066  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0067  Send a Message to Another Te  LENGTH 2 & LOCAL AX$                 ! Define AX register                          DOS:MESSAGE                     0068  Send a Message to Another Te  LENGTH 3 & LOCAL TERMINAL$           ! Define terminal number                      DOS:MESSAGE                     0069  Send a Message to Another Te  LENGTH 60 & LOCAL DATALINE$          ! Define message variable                     DOS:MESSAGE                     0070  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0071  Send a Message to Another Te  100 FORMAT (ET)                      ! Screen format                               DOS:MESSAGE                     0072  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0073  Send a Message to Another Te  MESSAGE: FORMAT "@0E07@";_           ! Write to the control line                   DOS:MESSAGE                     0074  Send a Message to Another Te                 (RB);(SF);_           ! Ring bell/set foreground                    DOS:MESSAGE                     0075  Send a Message to Another Te                 DATALINE$             ! Display the message                         DOS:MESSAGE                     0076  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0077  Send a Message to Another Te  CLEAR                                ! Initialize all variables                    DOS:MESSAGE                     0078  Send a Message to Another Te  PRINT (0,100)                        ! Set typewriter mode                         DOS:MESSAGE                     0079  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0080  Send a Message to Another Te  PRINT (0) "ENTER TERMINAL NUMBER:"   ! Display prompt                              DOS:MESSAGE                     0081  Send a Message to Another Te  INPUT (0) TERMINAL$                  ! Enter terminal number                       DOS:MESSAGE                     0082  Send a Message to Another Te  IF TERMINAL$ = "" THEN RUN "QMONITOR"  ! If null, then stop                        DOS:MESSAGE                     0083  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0084  Send a Message to Another Te  PRINT (0) "ENTER MESSAGE:"           ! Display prompt                              DOS:MESSAGE                     0085  Send a Message to Another Te  INPUT (0) DATALINE$                  ! Enter message to be sent                    DOS:MESSAGE                     0086  Send a Message to Another Te  IF DATALINE$ = "" THEN RUN "QMONITOR"  ! If null, then stop                        DOS:MESSAGE                     0087  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0088  Send a Message to Another Te  AX$ = "@FFFF@"                       ! Set AX to "SEND MESSAGE"                    DOS:MESSAGE                     0089  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0090  Send a Message to Another Te  DOSRW(AX$,TERMINAL$,60,MESSAGE) EXCP=EXCEPTION   ! Send message                    DOS:MESSAGE                     0091  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0092  Send a Message to Another Te  PRINT (0) "MESSAGE SENT TO ";TERMINAL$                                             DOS:MESSAGE                     0093  Send a Message to Another Te  INPUT (0) ""                                                                       DOS:MESSAGE                     0094  Send a Message to Another Te  RUN "QMONITOR"                                                                     DOS:MESSAGE                     0095  Send a Message to Another Te  !                                                                                  DOS:MESSAGE                     0096  Send a Message to Another Te  EXCEPTION:                           ! Exception routine                           DOS:MESSAGE                     0097  Send a Message to Another Te  PRINT (0) "MESSAGE NOT SENT."                                                      DOS:MESSAGE                     0098  Send a Message to Another Te  INPUT (0) ""                                                                       DOS:MESSAGE                     0099  Send a Message to Another Te  RUN "QMONITOR"                                                                     DOS:MESSAGE                     0100  Send a Message to Another Te  END                                                                                DOS:MESSAGEALL                  0001  Send a Message to All TerminSend a message to all terminals                                                      DOS:MESSAGEALL                  0002  Send a Message to All Termin===============================                                                      DOS:MESSAGEALL                  0003  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0004  Send a Message to All TerminSyntax:                                                                              DOS:MESSAGEALL                  0005  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0006  Send a Message to All Termin  DOSRW(AX-value, number-of-bytes,                                                   DOS:MESSAGEALL                  0007  Send a Message to All Termin       format-statement-label) EXCP=statement-label                                  DOS:MESSAGEALL                  0008  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0009  Send a Message to All TerminEntry:                                                                               DOS:MESSAGEALL                  0010  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0011  Send a Message to All Termin  AX-value = "@FFFE@"                                                                DOS:MESSAGEALL                  0012  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0013  Send a Message to All Termin  number-of-bytes = number of characters to be written to another                    DOS:MESSAGEALL                  0014  Send a Message to All Termin  terminal                                                                           DOS:MESSAGEALL                  0015  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0016  Send a Message to All Termin  format-statement-label = format statement containing the message                   DOS:MESSAGEALL                  0017  Send a Message to All Termin  to be written to the other terminal (may be a constant or                          DOS:MESSAGEALL                  0018  Send a Message to All Termin  variable)                                                                          DOS:MESSAGEALL                  0019  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0020  Send a Message to All TerminReturn:                                                                              DOS:MESSAGEALL                  0021  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0022  Send a Message to All Termin  If the write function is successful, the message contained in the                  DOS:MESSAGEALL                  0023  Send a Message to All Termin  format statement will be sent to the terminal specified.                           DOS:MESSAGEALL                  0024  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0025  Send a Message to All Termin  If an exception occurs, byte 2 of the AX field will contain the                    DOS:MESSAGEALL                  0026  Send a Message to All Termin  DOS error code (in hex).                                                           DOS:MESSAGEALL                  0027  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0028  Send a Message to All TerminDiscussion:                                                                          DOS:MESSAGEALL                  0029  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0030  Send a Message to All Termin  This pseudo function sends a message to the write control line of                  DOS:MESSAGEALL                  0031  Send a Message to All Termin  all Comet workstations, including all workstations attached to a                   DOS:MESSAGEALL                  0032  Send a Message to All Termin  Comet Terminal Adapter and all workstations running Comet on a                     DOS:MESSAGEALL                  0033  Send a Message to All Termin  network.                                                                           DOS:MESSAGEALL                  0034  Send a Message to All Termin                                                                                     DOS:MESSAGEALL                  0035  Send a Message to All Termin  Also see <Send a Message to Another Terminal|DOS:MESSAGE>                          DOS:MKDIR                       0001  Create DOS Subdirectory     Create DOS Subdirectory (MKDIR)                                                      DOS:MKDIR                       0002  Create DOS Subdirectory     ===============================                                                      DOS:MKDIR                       0003  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0004  Create DOS Subdirectory     Syntax:                                                                              DOS:MKDIR                       0005  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0006  Create DOS Subdirectory       DOSFC(AX-value, CX-value, subdirectory-name) EXCP=statement-label                  DOS:MKDIR                       0007  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0008  Create DOS Subdirectory     Entry:                                                                               DOS:MKDIR                       0009  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0010  Create DOS Subdirectory       AX-value = "@3900@"                                                                DOS:MKDIR                       0011  Create DOS Subdirectory       CX-value = "@0000@"                                                                DOS:MKDIR                       0012  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0013  Create DOS Subdirectory     Return:                                                                              DOS:MKDIR                       0014  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0015  Create DOS Subdirectory       If an exception occurs, byte 2 of the AX field will contain the                    DOS:MKDIR                       0016  Create DOS Subdirectory       DOS error code (in hex).                                                           DOS:MKDIR                       0017  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0018  Create DOS Subdirectory     Discussion:                                                                          DOS:MKDIR                       0019  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0020  Create DOS Subdirectory       The DOSFC function call can be used to create a DOS subdirectory.                  DOS:MKDIR                       0021  Create DOS Subdirectory       This function requires that the AX-value be set to "@3900@", the                   DOS:MKDIR                       0022  Create DOS Subdirectory       CX-value be set to null, and the subdirectory-name contain the                     DOS:MKDIR                       0023  Create DOS Subdirectory       name of the new DOS subdirectory.                                                  DOS:MKDIR                       0024  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0025  Create DOS Subdirectory       After the DOSFC function is successfully executed, the new                         DOS:MKDIR                       0026  Create DOS Subdirectory       directory will exist. Note: The new directory does not                             DOS:MKDIR                       0027  Create DOS Subdirectory       automatically become the current directory. A different function                   DOS:MKDIR                       0028  Create DOS Subdirectory       call is required to make the new directory into the current                        DOS:MKDIR                       0029  Create DOS Subdirectory       directory. (See "Change Current DOS Subdirectory" above.)                          DOS:MKDIR                       0030  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0031  Create DOS Subdirectory     Example:                                                                             DOS:MKDIR                       0032  Create DOS Subdirectory                                                                                          DOS:MKDIR                       0033  Create DOS Subdirectory       ! S SMKDIR,DSK                                                                     DOS:MKDIR                       0034  Create DOS Subdirectory       ! O MKDIR,DSK                                                                      DOS:MKDIR                       0035  Create DOS Subdirectory       ! L T00,E                                                                          DOS:MKDIR                       0036  Create DOS Subdirectory       ! R QMONITOR                                                                       DOS:MKDIR                       0037  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0038  Create DOS Subdirectory       !==========  CREATE DOS SUBDIRECTORY (MKDIR) ====================                  DOS:MKDIR                       0039  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0040  Create DOS Subdirectory       LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:MKDIR                       0041  Create DOS Subdirectory       LENGTH 64 & LOCAL DIRECTORY$            ! Define directory name                    DOS:MKDIR                       0042  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0043  Create DOS Subdirectory       LENGTH  3 & LOCAL DOSCODE$              ! Define DOS error code                    DOS:MKDIR                       0044  Create DOS Subdirectory       LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:MKDIR                       0045  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0046  Create DOS Subdirectory       1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:MKDIR                       0047  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0048  Create DOS Subdirectory       100 FORMAT (ET)                         ! Screen format                            DOS:MKDIR                       0049  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0050  Create DOS Subdirectory       CLEAR                                   ! Initialize variables                     DOS:MKDIR                       0051  Create DOS Subdirectory       PRINT (0,100)                           ! Set typewriter mode                      DOS:MKDIR                       0052  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0053  Create DOS Subdirectory       PRINT (0) "ENTER DIRECTORY NAME:"       ! Display prompt                           DOS:MKDIR                       0054  Create DOS Subdirectory       INPUT (0) DIRECTORY$                    ! Enter directory name                     DOS:MKDIR                       0055  Create DOS Subdirectory       IF DIRECTORY$ = "" THEN RUN "QMONITOR"  ! If null, then stop                       DOS:MKDIR                       0056  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0057  Create DOS Subdirectory       AX$ = "@3900@"                          ! Set AX to "MAKE DIREC."                  DOS:MKDIR                       0058  Create DOS Subdirectory       CX$ = "@0000@"                          ! Set CX register to null                  DOS:MKDIR                       0059  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0060  Create DOS Subdirectory       DOSFC(AX$,CX$,DIRECTORY$) EXCP=EXCEPTION  ! Perform DOSFC call                     DOS:MKDIR                       0061  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0062  Create DOS Subdirectory       PRINT (0) DIRECTORY$;" CREATED SUCCESSFULLY."                                      DOS:MKDIR                       0063  Create DOS Subdirectory       INPUT (0) ""                                                                       DOS:MKDIR                       0064  Create DOS Subdirectory       RUN "QMONITOR"                                                                     DOS:MKDIR                       0065  Create DOS Subdirectory       !                                                                                  DOS:MKDIR                       0066  Create DOS Subdirectory       EXCEPTION:                              ! Exception routine                        DOS:MKDIR                       0067  Create DOS Subdirectory       PRINT (0) "DIRECTORY NOT CREATED."      ! Display message                          DOS:MKDIR                       0068  Create DOS Subdirectory       OPEN (1) "QERCOMET"                     ! Open error file                          DOS:MKDIR                       0069  Create DOS Subdirectory       DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:MKDIR                       0070  Create DOS Subdirectory       READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:MKDIR                       0071  Create DOS Subdirectory       PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:MKDIR                       0072  Create DOS Subdirectory       PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:MKDIR                       0073  Create DOS Subdirectory       INPUT (0) ""                            ! Hold                                     DOS:MKDIR                       0074  Create DOS Subdirectory       CLOSE (1)                               ! Close error file                         DOS:MKDIR                       0075  Create DOS Subdirectory       RUN "QMONITOR"                          ! Exit                                     DOS:MKDIR                       0076  Create DOS Subdirectory       END                                                                                DOS:MOVE                        0001  Move a file                 Move a file                                                                          DOS:MOVE                        0002  Move a file                 ===========                                                                          DOS:MOVE                        0003  Move a file                                                                                                      DOS:MOVE                        0004  Move a file                 Syntax:                                                                              DOS:MOVE                        0005  Move a file                                                                                                      DOS:MOVE                        0006  Move a file                   DOSRW(AX-value, BX-value, CX-value, DX-value)                                      DOS:MOVE                        0007  Move a file                        EXCP=statement-label                                                          DOS:MOVE                        0008  Move a file                                                                                                      DOS:MOVE                        0009  Move a file                 Entry:                                                                               DOS:MOVE                        0010  Move a file                                                                                                      DOS:MOVE                        0011  Move a file                   AX = "@FFF9@"                                                                      DOS:MOVE                        0012  Move a file                   BX = not used                                                                      DOS:MOVE                        0013  Move a file                   CX = the source file path                                                          DOS:MOVE                        0014  Move a file                   DX = the target file path                                                          DOS:MOVE                        0015  Move a file                                                                                                      DOS:MOVE                        0016  Move a file                 Discussion:                                                                          DOS:MOVE                        0017  Move a file                                                                                                      DOS:MOVE                        0018  Move a file                   This pseudo function moves a file from one directory to another.                   DOS:MOVE                        0019  Move a file                   If the target directory is on the same logical drive as the                        DOS:MOVE                        0020  Move a file                   source directory, the file is renamed.  Otherwise, the file is                     DOS:MOVE                        0021  Move a file                   copied to the target drive, after which the source file is                         DOS:MOVE                        0022  Move a file                   erased.                                                                            DOS:OPEN                        0001  Open DOS File               Open DOS File                                                                        DOS:OPEN                        0002  Open DOS File               =============                                                                        DOS:OPEN                        0003  Open DOS File                                                                                                    DOS:OPEN                        0004  Open DOS File               Syntax:                                                                              DOS:OPEN                        0005  Open DOS File                                                                                                    DOS:OPEN                        0006  Open DOS File                 DOSFC(AX-value, CX-value, file-name) EXCP=statement-label                          DOS:OPEN                        0007  Open DOS File                                                                                                    DOS:OPEN                        0008  Open DOS File               Entry:                                                                               DOS:OPEN                        0009  Open DOS File                                                                                                    DOS:OPEN                        0010  Open DOS File                 AX-value = "@3D00@"         (read only)                                            DOS:OPEN                        0011  Open DOS File                 CX-value = "@0000@"                                                                DOS:OPEN                        0012  Open DOS File                                                                                                    DOS:OPEN                        0013  Open DOS File                 (or)                                                                               DOS:OPEN                        0014  Open DOS File                                                                                                    DOS:OPEN                        0015  Open DOS File                 AX-value = "@3D42@"         (read/write)                                           DOS:OPEN                        0016  Open DOS File                 CX-value = "@0000@"                                                                DOS:OPEN                        0017  Open DOS File                                                                                                    DOS:OPEN                        0018  Open DOS File               Return:                                                                              DOS:OPEN                        0019  Open DOS File                                                                                                    DOS:OPEN                        0020  Open DOS File                 If the function call is successful, the AX field will contain the                  DOS:OPEN                        0021  Open DOS File                 file's handle.                                                                     DOS:OPEN                        0022  Open DOS File                                                                                                    DOS:OPEN                        0023  Open DOS File                 If an exception occurs, byte 2 of the AX field will contain the                    DOS:OPEN                        0024  Open DOS File                 DOS error code (in hex).                                                           DOS:OPEN                        0025  Open DOS File                                                                                                    DOS:OPEN                        0026  Open DOS File               Discussion:                                                                          DOS:OPEN                        0027  Open DOS File                                                                                                    DOS:OPEN                        0028  Open DOS File                 The DOSFC function call can be used to open a DOS file.                            DOS:OPEN                        0029  Open DOS File                                                                                                    DOS:OPEN                        0030  Open DOS File                 For read-only purposes, the function requires that the AX-value                    DOS:OPEN                        0031  Open DOS File                 be set to "@3D00@" and the CX-value be set to null.                                DOS:OPEN                        0032  Open DOS File                                                                                                    DOS:OPEN                        0033  Open DOS File                 For read/write purposes, the function requires that the AX-value                   DOS:OPEN                        0034  Open DOS File                 be set to "@3D42@" and the CX-value be set to null.                                DOS:OPEN                        0035  Open DOS File                                                                                                    DOS:OPEN                        0036  Open DOS File                 After the function is executed, the file will be open and the AX                   DOS:OPEN                        0037  Open DOS File                 register will contain the file's handle. As noted earlier, it is                   DOS:OPEN                        0038  Open DOS File                 the responsibility of the programmer to ensure that any file                       DOS:OPEN                        0039  Open DOS File                 handles opened are closed upon completion of the desired                           DOS:OPEN                        0040  Open DOS File                 function. Failure to comply will result in degradation of system                   DOS:OPEN                        0041  Open DOS File                 performance and possible system hangs.                                             DOS:OPEN                        0042  Open DOS File                                                                                                    DOS:OPEN                        0043  Open DOS File               Example:                                                                             DOS:OPEN                        0044  Open DOS File                                                                                                    DOS:OPEN                        0045  Open DOS File                 ! S SFOPEN,DSK                                                                     DOS:OPEN                        0046  Open DOS File                 ! O FOPEN,DSK                                                                      DOS:OPEN                        0047  Open DOS File                 ! L T00,E                                                                          DOS:OPEN                        0048  Open DOS File                 ! R QMONITOR                                                                       DOS:OPEN                        0049  Open DOS File                 !                                                                                  DOS:OPEN                        0050  Open DOS File                 !==========  OPEN DOS FILE HANDLE  =============================                   DOS:OPEN                        0051  Open DOS File                 !                                                                                  DOS:OPEN                        0052  Open DOS File                 LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:OPEN                        0053  Open DOS File                            LOCAL FILEHANDLE$            ! Define file handle                       DOS:OPEN                        0054  Open DOS File                 LENGTH 64 & LOCAL FILENAME$             ! Define file name                         DOS:OPEN                        0055  Open DOS File                 !                                                                                  DOS:OPEN                        0056  Open DOS File                 LENGTH  3 & LOCAL DOSCODE$              ! Define DOS error code                    DOS:OPEN                        0057  Open DOS File                 LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:OPEN                        0058  Open DOS File                 !                                                                                  DOS:OPEN                        0059  Open DOS File                 100 FORMAT (ET)                         ! Screen format                            DOS:OPEN                        0060  Open DOS File                 !                                                                                  DOS:OPEN                        0061  Open DOS File                 1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:OPEN                        0062  Open DOS File                 !                                                                                  DOS:OPEN                        0063  Open DOS File                 CLEAR                                   ! Initialize variables                     DOS:OPEN                        0064  Open DOS File                 PRINT (0,100)                           ! Set typewriter mode                      DOS:OPEN                        0065  Open DOS File                 !                                                                                  DOS:OPEN                        0066  Open DOS File                 PRINT (0) "ENTER FILENAME TO OPEN:"     ! Display prompt                           DOS:OPEN                        0067  Open DOS File                 INPUT (0) FILENAME$                     ! Enter file name                          DOS:OPEN                        0068  Open DOS File                 IF FILENAME$ = "" THEN RUN "QMONITOR"   ! If null, then stop                       DOS:OPEN                        0069  Open DOS File                 FILENAME$ = FILENAME$ + "@00@"          ! Add null byte to name                    DOS:OPEN                        0070  Open DOS File                 !                                                                                  DOS:OPEN                        0071  Open DOS File                 AX$ = "@3D42@"                          ! Set AX to "OPEN FILE"                    DOS:OPEN                        0072  Open DOS File                 CX$ = "@0000@"                          ! Set CX to null                           DOS:OPEN                        0073  Open DOS File                 !                                                                                  DOS:OPEN                        0074  Open DOS File                 DOSFC(AX$,CX$,FILENAME$) EXCP=BRANCH1   ! Perform DOSFC call                       DOS:OPEN                        0075  Open DOS File                 !                                                                                  DOS:OPEN                        0076  Open DOS File                 FILEHANDLE$ = AX$                       ! Save file handle                         DOS:OPEN                        0077  Open DOS File                 !                                                                                  DOS:OPEN                        0078  Open DOS File                 PRINT (0) FILENAME$;" OPENED SUCCESSFULLY."                                        DOS:OPEN                        0079  Open DOS File                 PRINT (0) "PRESS ENTER TO CLOSE THE FILE."                                         DOS:OPEN                        0080  Open DOS File                 INPUT (0) ""                                                                       DOS:OPEN                        0081  Open DOS File                 !                                                                                  DOS:OPEN                        0082  Open DOS File                 AX$ = "@3E00@"                          ! Set AX to "CLOSE FILE"                   DOS:OPEN                        0083  Open DOS File                 BX$ = FILEHANDLE$                       ! Set BX to file handle                    DOS:OPEN                        0084  Open DOS File                 CX$ = "@0000@"                          ! Set CX to null                           DOS:OPEN                        0085  Open DOS File                 DX$ = "@0000@"                          ! Set DX to null                           DOS:OPEN                        0086  Open DOS File                 !                                                                                  DOS:OPEN                        0087  Open DOS File                 DOSMS(AX$,BX$,CX$,DX$) EXCP=BRANCH2     ! Perform DOSMS call                       DOS:OPEN                        0088  Open DOS File                 !                                                                                  DOS:OPEN                        0089  Open DOS File                 PRINT (0) FILENAME$;" CLOSED SUCCESSFULLY."                                        DOS:OPEN                        0090  Open DOS File                 PRINT (0) "PRESS ENTER TO STOP."                                                   DOS:OPEN                        0091  Open DOS File                 INPUT (0) ""                                                                       DOS:OPEN                        0092  Open DOS File                 RUN "QMONITOR"                                                                     DOS:OPEN                        0093  Open DOS File                 !                                                                                  DOS:OPEN                        0094  Open DOS File                 BRANCH1:                                ! Exception routine 1                      DOS:OPEN                        0095  Open DOS File                 PRINT (0) "FILE NOT OPENED."            ! Display message                          DOS:OPEN                        0096  Open DOS File                 OPEN (1) "QERCOMET"                     ! Open error file                          DOS:OPEN                        0097  Open DOS File                 DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:OPEN                        0098  Open DOS File                 READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:OPEN                        0099  Open DOS File                 PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:OPEN                        0100  Open DOS File                 PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:OPEN                        0101  Open DOS File                 INPUT (0) ""                            ! Hold                                     DOS:OPEN                        0102  Open DOS File                 CLOSE (1)                               ! Close error file                         DOS:OPEN                        0103  Open DOS File                 RUN "QMONITOR"                          ! Exit                                     DOS:OPEN                        0104  Open DOS File                 !                                                                                  DOS:OPEN                        0105  Open DOS File                 BRANCH2:                                ! Exception routine 2                      DOS:OPEN                        0106  Open DOS File                 PRINT (0) "FILE NOT CLOSED."            ! Display message                          DOS:OPEN                        0107  Open DOS File                 OPEN (1) "QERCOMET"                     ! Open error file                          DOS:OPEN                        0108  Open DOS File                 DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:OPEN                        0109  Open DOS File                 READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:OPEN                        0110  Open DOS File                 PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:OPEN                        0111  Open DOS File                 PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:OPEN                        0112  Open DOS File                 INPUT (0) ""                            ! Hold                                     DOS:OPEN                        0113  Open DOS File                 CLOSE (1) & RUN "QMONITOR"              ! Close error file/exit                    DOS:OPEN                        0114  Open DOS File                 END                                                                                DOS:READ                        0001  Read From a DOS File        Read From a DOS File                                                                 DOS:READ                        0002  Read From a DOS File        ====================                                                                 DOS:READ                        0003  Read From a DOS File                                                                                             DOS:READ                        0004  Read From a DOS File        Syntax:                                                                              DOS:READ                        0005  Read From a DOS File                                                                                             DOS:READ                        0006  Read From a DOS File          DOSRW(AX-value, file-handle, number-of-bytes,                                      DOS:READ                        0007  Read From a DOS File             format-statement-label) EXCP=statement-label                                    DOS:READ                        0008  Read From a DOS File                                                                                             DOS:READ                        0009  Read From a DOS File        Entry:                                                                               DOS:READ                        0010  Read From a DOS File                                                                                             DOS:READ                        0011  Read From a DOS File          AX-value = "@3F00@"                                                                DOS:READ                        0012  Read From a DOS File                                                                                             DOS:READ                        0013  Read From a DOS File          file-handle = file handle established when the file was opened                     DOS:READ                        0014  Read From a DOS File                                                                                             DOS:READ                        0015  Read From a DOS File          number-of-bytes = number of characters to be read                                  DOS:READ                        0016  Read From a DOS File                                                                                             DOS:READ                        0017  Read From a DOS File          format-statement-label = format statement to be used to receive                    DOS:READ                        0018  Read From a DOS File          incoming data from DOS file                                                        DOS:READ                        0019  Read From a DOS File                                                                                             DOS:READ                        0020  Read From a DOS File        Return:                                                                              DOS:READ                        0021  Read From a DOS File                                                                                             DOS:READ                        0022  Read From a DOS File          If the read function is successful, the data variable(s)                           DOS:READ                        0023  Read From a DOS File          contained in the format statement will contain the data from the                   DOS:READ                        0024  Read From a DOS File          DOS file, and the AX register will contain the number of bytes                     DOS:READ                        0025  Read From a DOS File          that were actually read (in hex).                                                  DOS:READ                        0026  Read From a DOS File                                                                                             DOS:READ                        0027  Read From a DOS File          If an exception occurs, byte 2 of the AX field will contain the                    DOS:READ                        0028  Read From a DOS File          DOS error code (in hex).                                                           DOS:READ                        0029  Read From a DOS File                                                                                             DOS:READ                        0030  Read From a DOS File        Discussion:                                                                          DOS:READ                        0031  Read From a DOS File                                                                                             DOS:READ                        0032  Read From a DOS File          The DOSRW function can be used to read data from a DOS file. The                   DOS:READ                        0033  Read From a DOS File          data is received into a variable or multiple variables listed in                   DOS:READ                        0034  Read From a DOS File          an MTB format statement.                                                           DOS:READ                        0035  Read From a DOS File                                                                                             DOS:READ                        0036  Read From a DOS File          This function requires that the AX-value be set to "@3F00@". The                   DOS:READ                        0037  Read From a DOS File          file's handle (established when the file was opened) must also be                  DOS:READ                        0038  Read From a DOS File          included in this function call. Likewise, you must specify the                     DOS:READ                        0039  Read From a DOS File          number of bytes to be read from the DOS file and the label of the                  DOS:READ                        0040  Read From a DOS File          format statement that will receive the incoming data.                              DOS:READ                        0041  Read From a DOS File                                                                                             DOS:READ                        0042  Read From a DOS File          After the function is executed, the data variable(s) contained in                  DOS:READ                        0043  Read From a DOS File          the format statement will contain the data read from the DOS file                  DOS:READ                        0044  Read From a DOS File          (assuming there was any data in the file). Also, the AX register                   DOS:READ                        0045  Read From a DOS File          will contain the number of bytes that were actually read from the                  DOS:READ                        0046  Read From a DOS File          file. This value is in hex, so it will have to be converted to                     DOS:READ                        0047  Read From a DOS File          decimal to serve any meaningful purpose.                                           DOS:READ                        0048  Read From a DOS File                                                                                             DOS:READ                        0049  Read From a DOS File          One application of this AX value is to test for the "end of                        DOS:READ                        0050  Read From a DOS File          file."  For example, if the number of bytes actually read from a                   DOS:READ                        0051  Read From a DOS File          DOS file equals 0, that means that there is no more data to read                   DOS:READ                        0052  Read From a DOS File          (i.e., the end of file).                                                           DOS:READ                        0053  Read From a DOS File                                                                                             DOS:READ                        0054  Read From a DOS File        Example:                                                                             DOS:READ                        0055  Read From a DOS File                                                                                             DOS:READ                        0056  Read From a DOS File          ! S SFREAD,DSK                                                                     DOS:READ                        0057  Read From a DOS File          ! O FREAD,DSK                                                                      DOS:READ                        0058  Read From a DOS File          ! L T00,E                                                                          DOS:READ                        0059  Read From a DOS File          ! R QMONITOR                                                                       DOS:READ                        0060  Read From a DOS File          !                                                                                  DOS:READ                        0061  Read From a DOS File          !==========  READ FROM A DOS FILE  ==============================                  DOS:READ                        0062  Read From a DOS File          !                                                                                  DOS:READ                        0063  Read From a DOS File          LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:READ                        0064  Read From a DOS File                     LOCAL FILEHANDLE$            ! Define file handle                       DOS:READ                        0065  Read From a DOS File          LENGTH 64 & LOCAL FILENAME$             ! Define file name                         DOS:READ                        0066  Read From a DOS File          LENGTH 4.0 & LOCAL BYTES                ! Define byte counter                      DOS:READ                        0067  Read From a DOS File          !                                                                                  DOS:READ                        0068  Read From a DOS File          LENGTH 100 & LOCAL DATASTRING$          ! Define data string                       DOS:READ                        0069  Read From a DOS File          !                                                                                  DOS:READ                        0070  Read From a DOS File          LENGTH 3 & LOCAL DOSCODE$               ! Define DOS error code                    DOS:READ                        0071  Read From a DOS File          LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:READ                        0072  Read From a DOS File          !                                                                                  DOS:READ                        0073  Read From a DOS File          1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:READ                        0074  Read From a DOS File          !                                                                                  DOS:READ                        0075  Read From a DOS File          100 FORMAT (ET)                         ! Screen format                            DOS:READ                        0076  Read From a DOS File          !                                                                                  DOS:READ                        0077  Read From a DOS File          9999 FORMAT DATASTRING$                 ! DOS file input format                    DOS:READ                        0078  Read From a DOS File          !                                                                                  DOS:READ                        0079  Read From a DOS File          CLEAR                                   ! Initialize variables                     DOS:READ                        0080  Read From a DOS File          PRINT (0,100)                           ! Set typewriter mode                      DOS:READ                        0081  Read From a DOS File          !                                                                                  DOS:READ                        0082  Read From a DOS File          PRINT (0) "NAME OF DOS FILE TO OPEN:"   ! Display prompt                           DOS:READ                        0083  Read From a DOS File          INPUT (0) FILENAME$                     ! Enter file name                          DOS:READ                        0084  Read From a DOS File          IF FILENAME$ = "" THEN RUN "QMONITOR"   ! If null, then stop                       DOS:READ                        0085  Read From a DOS File          !                                                                                  DOS:READ                        0086  Read From a DOS File          AX$ = "@3D42@"                          ! Set AX to "OPEN FILE"                    DOS:READ                        0087  Read From a DOS File          CX$ = "@0000@"                          ! Set CX to null                           DOS:READ                        0088  Read From a DOS File          !                                                                                  DOS:READ                        0089  Read From a DOS File          DOSFC(AX$,CX$,FILENAME$) EXCP=EXCEPTION ! Perform DOSFC call                       DOS:READ                        0090  Read From a DOS File          !                                                                                  DOS:READ                        0091  Read From a DOS File          FILEHANDLE$ = AX$                       ! Store the file handle                    DOS:READ                        0092  Read From a DOS File          !                                                                                  DOS:READ                        0093  Read From a DOS File          READ:                                   ! Start of read loop                       DOS:READ                        0094  Read From a DOS File          AX$ = "@3F00@"                          ! Set AX to "READ"                         DOS:READ                        0095  Read From a DOS File          !                                                                                  DOS:READ                        0096  Read From a DOS File          DOSRW(AX$,FILEHANDLE$,100,9999) EXCP=EXCEPTION   ! Read 100 bytes                  DOS:READ                        0097  Read From a DOS File          !                                                                                  DOS:READ                        0098  Read From a DOS File          BYTES = HEXDEC(AX$)                     ! Convert AX to decimal                    DOS:READ                        0099  Read From a DOS File          IF BYTES = 0 THEN GOTO BOTTOM           ! Check for end-of-file                    DOS:READ                        0100  Read From a DOS File          !                                                                                  DOS:READ                        0101  Read From a DOS File          PRINT (0) DATASTRING$                   ! Display data from file                   DOS:READ                        0102  Read From a DOS File          !                                                                                  DOS:READ                        0103  Read From a DOS File          GOTO READ                               ! Loop back                                DOS:READ                        0104  Read From a DOS File          !                                                                                  DOS:READ                        0105  Read From a DOS File          EXCEPTION:                              ! Exception routine                        DOS:READ                        0106  Read From a DOS File          PRINT (0) "DOS ERROR DURING READ"       ! Display message                          DOS:READ                        0107  Read From a DOS File          OPEN (1) "QERCOMET"                     ! Open error file                          DOS:READ                        0108  Read From a DOS File          DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:READ                        0109  Read From a DOS File          READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:READ                        0110  Read From a DOS File          PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:READ                        0111  Read From a DOS File          PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:READ                        0112  Read From a DOS File          INPUT (0) ""                            ! Hold                                     DOS:READ                        0113  Read From a DOS File          CLOSE (1)                               ! Close error file                         DOS:READ                        0114  Read From a DOS File          RUN "QMONITOR"                          ! Exit                                     DOS:READ                        0115  Read From a DOS File          !                                                                                  DOS:READ                        0116  Read From a DOS File          BOTTOM: AX$ = "@3E00@"                  ! Set AX to "CLOSE FILE"                   DOS:READ                        0117  Read From a DOS File                 BX$ = FILEHANDLE$               ! Set BX to file handle                     DOS:READ                        0118  Read From a DOS File                 CX$ = "@0000@"                  ! Set CX to null                            DOS:READ                        0119  Read From a DOS File                 DX$ = "@0000@"                  ! Set DX to null                            DOS:READ                        0120  Read From a DOS File                 DOSMS(AX$,BX$,CX$,DX$)          ! Perform DOSMS call                        DOS:READ                        0121  Read From a DOS File                 RUN "QMONITOR"                  ! Exit                                      DOS:READ                        0122  Read From a DOS File          END                                                                                DOS:RMDIR                       0001  Remove DOS Subdirectory     Remove DOS Subdirectory (RMDIR)                                                      DOS:RMDIR                       0002  Remove DOS Subdirectory     ===============================                                                      DOS:RMDIR                       0003  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0004  Remove DOS Subdirectory     Syntax:                                                                              DOS:RMDIR                       0005  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0006  Remove DOS Subdirectory       DOSFC(AX-value, CX-value, subdirectory-name) EXCP=statement-label                  DOS:RMDIR                       0007  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0008  Remove DOS Subdirectory     Entry:                                                                               DOS:RMDIR                       0009  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0010  Remove DOS Subdirectory       AX-value = "@3A00@"                                                                DOS:RMDIR                       0011  Remove DOS Subdirectory       CX-value = "@0000@"                                                                DOS:RMDIR                       0012  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0013  Remove DOS Subdirectory     Return:                                                                              DOS:RMDIR                       0014  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0015  Remove DOS Subdirectory       If an exception occurs, byte 2 of the AX field will contain the                    DOS:RMDIR                       0016  Remove DOS Subdirectory       DOS error code (in hex).                                                           DOS:RMDIR                       0017  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0018  Remove DOS Subdirectory     Discussion:                                                                          DOS:RMDIR                       0019  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0020  Remove DOS Subdirectory       The DOSFC function call can be used to remove a DOS subdirectory.                  DOS:RMDIR                       0021  Remove DOS Subdirectory       This function requires that the AX-value be set to "@3A00@" and                    DOS:RMDIR                       0022  Remove DOS Subdirectory       the CX-value be set to null. The subdirectory-name parameter must                  DOS:RMDIR                       0023  Remove DOS Subdirectory       contain the name of the subdirectory to be removed from the disk.                  DOS:RMDIR                       0024  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0025  Remove DOS Subdirectory       Upon successful execution of this function, the named                              DOS:RMDIR                       0026  Remove DOS Subdirectory       subdirectory will no longer exist.                                                 DOS:RMDIR                       0027  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0028  Remove DOS Subdirectory     Example:                                                                             DOS:RMDIR                       0029  Remove DOS Subdirectory                                                                                          DOS:RMDIR                       0030  Remove DOS Subdirectory       ! S SRMDIR,DSK                                                                     DOS:RMDIR                       0031  Remove DOS Subdirectory       ! O RMDIR,DSK                                                                      DOS:RMDIR                       0032  Remove DOS Subdirectory       ! L T00,E                                                                          DOS:RMDIR                       0033  Remove DOS Subdirectory       ! R QMONITOR                                                                       DOS:RMDIR                       0034  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0035  Remove DOS Subdirectory       !==========  REMOVE DOS SUBDIRECTORY (RMDIR)  ===================                  DOS:RMDIR                       0036  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0037  Remove DOS Subdirectory       LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:RMDIR                       0038  Remove DOS Subdirectory       LENGTH 64 & LOCAL DIRECTORY$            ! Define directory name                    DOS:RMDIR                       0039  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0040  Remove DOS Subdirectory       LENGTH 3 & LOCAL DOSCODE$               ! Define DOS error code                    DOS:RMDIR                       0041  Remove DOS Subdirectory       LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:RMDIR                       0042  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0043  Remove DOS Subdirectory       1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:RMDIR                       0044  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0045  Remove DOS Subdirectory       100 FORMAT (ET)                         ! Screen format                            DOS:RMDIR                       0046  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0047  Remove DOS Subdirectory       CLEAR                                   ! Initialize variables                     DOS:RMDIR                       0048  Remove DOS Subdirectory       PRINT (0,100)                           ! Set typewriter mode                      DOS:RMDIR                       0049  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0050  Remove DOS Subdirectory       PRINT (0) "ENTER DIRECTORY NAME:"       ! Display prompt                           DOS:RMDIR                       0051  Remove DOS Subdirectory       INPUT (0) DIRECTORY$                    ! Enter directory name                     DOS:RMDIR                       0052  Remove DOS Subdirectory       IF DIRECTORY$ = "" THEN RUN "QMONITOR"  ! If null, then stop                       DOS:RMDIR                       0053  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0054  Remove DOS Subdirectory       AX$ = "@3A00@"                          ! Set AX to "REMOVE DIR."                  DOS:RMDIR                       0055  Remove DOS Subdirectory       CX$ = "@0000@"                          ! Set CX register to null                  DOS:RMDIR                       0056  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0057  Remove DOS Subdirectory       DOSFC(AX$,CX$,DIRECTORY$) EXCP=EXCEPTION  ! Perform DOSFC call                     DOS:RMDIR                       0058  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0059  Remove DOS Subdirectory       PRINT (0) DIRECTORY$;" REMOVED."                                                   DOS:RMDIR                       0060  Remove DOS Subdirectory       INPUT (0) ""                                                                       DOS:RMDIR                       0061  Remove DOS Subdirectory       RUN "QMONITOR"                                                                     DOS:RMDIR                       0062  Remove DOS Subdirectory       !                                                                                  DOS:RMDIR                       0063  Remove DOS Subdirectory       EXCEPTION:                              ! Exception routine                        DOS:RMDIR                       0064  Remove DOS Subdirectory       PRINT (0) "DIRECTORY NOT REMOVED."      ! Display message                          DOS:RMDIR                       0065  Remove DOS Subdirectory       OPEN (1) "QERCOMET"                     ! Open error file                          DOS:RMDIR                       0066  Remove DOS Subdirectory       DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:RMDIR                       0067  Remove DOS Subdirectory       READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:RMDIR                       0068  Remove DOS Subdirectory       PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:RMDIR                       0069  Remove DOS Subdirectory       PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:RMDIR                       0070  Remove DOS Subdirectory       INPUT (0) ""                            ! Hold                                     DOS:RMDIR                       0071  Remove DOS Subdirectory       CLOSE (1)                               ! Close error file                         DOS:RMDIR                       0072  Remove DOS Subdirectory       RUN "QMONITOR"                          ! Exit                                     DOS:RMDIR                       0073  Remove DOS Subdirectory       END                                                                                DOS:WRITE                       0001  Write to a DOS File         Write to a DOS File                                                                  DOS:WRITE                       0002  Write to a DOS File         ===================                                                                  DOS:WRITE                       0003  Write to a DOS File                                                                                              DOS:WRITE                       0004  Write to a DOS File         Syntax:                                                                              DOS:WRITE                       0005  Write to a DOS File                                                                                              DOS:WRITE                       0006  Write to a DOS File           DOSRW(AX-value, file-handle, number-of-bytes,                                      DOS:WRITE                       0007  Write to a DOS File              format-statement-label) EXCP=statement-label                                    DOS:WRITE                       0008  Write to a DOS File                                                                                              DOS:WRITE                       0009  Write to a DOS File         Entry:                                                                               DOS:WRITE                       0010  Write to a DOS File                                                                                              DOS:WRITE                       0011  Write to a DOS File           AX-value = "@4000@"                                                                DOS:WRITE                       0012  Write to a DOS File                                                                                              DOS:WRITE                       0013  Write to a DOS File           file-handle = file handle established when the file was opened                     DOS:WRITE                       0014  Write to a DOS File                                                                                              DOS:WRITE                       0015  Write to a DOS File           number-of-bytes = number of characters to be written                               DOS:WRITE                       0016  Write to a DOS File                                                                                              DOS:WRITE                       0017  Write to a DOS File           format-statement-label = format statement containing the data                      DOS:WRITE                       0018  Write to a DOS File           variables to be written to the DOS file                                            DOS:WRITE                       0019  Write to a DOS File                                                                                              DOS:WRITE                       0020  Write to a DOS File         Return:                                                                              DOS:WRITE                       0021  Write to a DOS File                                                                                              DOS:WRITE                       0022  Write to a DOS File           If the write function is successful, the data variable(s)                          DOS:WRITE                       0023  Write to a DOS File           contained in the format statement will be written to the DOS                       DOS:WRITE                       0024  Write to a DOS File           file, and the AX register will contain the number of bytes that                    DOS:WRITE                       0025  Write to a DOS File           were actually written (in hex).                                                    DOS:WRITE                       0026  Write to a DOS File                                                                                              DOS:WRITE                       0027  Write to a DOS File           If an exception occurs, byte 2 of the AX field will contain the                    DOS:WRITE                       0028  Write to a DOS File           DOS error code (in hex).                                                           DOS:WRITE                       0029  Write to a DOS File                                                                                              DOS:WRITE                       0030  Write to a DOS File         Discussion:                                                                          DOS:WRITE                       0031  Write to a DOS File                                                                                              DOS:WRITE                       0032  Write to a DOS File           The DOSRW function can be used to write data to a DOS file. The                    DOS:WRITE                       0033  Write to a DOS File           data to be written is listed in an MTB format statement.                           DOS:WRITE                       0034  Write to a DOS File                                                                                              DOS:WRITE                       0035  Write to a DOS File           This function requires that the AX-value be set to "@4F00@". The                   DOS:WRITE                       0036  Write to a DOS File           file's handle (established when the file was opened) must also be                  DOS:WRITE                       0037  Write to a DOS File           included in the function call.                                                     DOS:WRITE                       0038  Write to a DOS File                                                                                              DOS:WRITE                       0039  Write to a DOS File           Likewise, you must specify the number of bytes to be written to                    DOS:WRITE                       0040  Write to a DOS File           the DOS file and the label of the format statement containing the                  DOS:WRITE                       0041  Write to a DOS File           data to be written to the file.                                                    DOS:WRITE                       0042  Write to a DOS File                                                                                              DOS:WRITE                       0043  Write to a DOS File           After the function is executed, the DOS file will contain the                      DOS:WRITE                       0044  Write to a DOS File           data values from the format statement. Also, the AX register will                  DOS:WRITE                       0045  Write to a DOS File           contain the number of bytes that were actually written to the                      DOS:WRITE                       0046  Write to a DOS File           file. This value is in hex, so it will have to be converted to                     DOS:WRITE                       0047  Write to a DOS File           decimal to serve any meaningful purpose.                                           DOS:WRITE                       0048  Write to a DOS File                                                                                              DOS:WRITE                       0049  Write to a DOS File           One application of this AX value is to test for a "disk full"                      DOS:WRITE                       0050  Write to a DOS File           condition. For example, if the number of bytes actually written                    DOS:WRITE                       0051  Write to a DOS File           to a DOS file is less than the number specified to be written, it                  DOS:WRITE                       0052  Write to a DOS File           means that there is no more room to write the data on the disk                     DOS:WRITE                       0053  Write to a DOS File           (i.e., the disk is full).                                                          DOS:WRITE                       0054  Write to a DOS File                                                                                              DOS:WRITE                       0055  Write to a DOS File         Example:                                                                             DOS:WRITE                       0056  Write to a DOS File                                                                                              DOS:WRITE                       0057  Write to a DOS File           ! S SFWRITE,DSK                                                                    DOS:WRITE                       0058  Write to a DOS File           ! O FWRITE,DSK                                                                     DOS:WRITE                       0059  Write to a DOS File           ! L T00,E                                                                          DOS:WRITE                       0060  Write to a DOS File           ! R QMONITOR                                                                       DOS:WRITE                       0061  Write to a DOS File           !                                                                                  DOS:WRITE                       0062  Write to a DOS File           !==========  WRITE TO A DOS FILE  ==============================                   DOS:WRITE                       0063  Write to a DOS File           !                                                                                  DOS:WRITE                       0064  Write to a DOS File           LENGTH 2 & LOCAL AX$,BX$,CX$,DX$        ! Define registers                         DOS:WRITE                       0065  Write to a DOS File                      LOCAL FILEHANDLE$            ! Define file handle                       DOS:WRITE                       0066  Write to a DOS File           LENGTH 64 & LOCAL FILENAME$             ! Define file name                         DOS:WRITE                       0067  Write to a DOS File           !                                                                                  DOS:WRITE                       0068  Write to a DOS File           LENGTH 100 & LOCAL DATASTRING$          ! Define data string                       DOS:WRITE                       0069  Write to a DOS File           !                                                                                  DOS:WRITE                       0070  Write to a DOS File           LENGTH 3 & LOCAL DOSCODE$               ! Define DOS error code                    DOS:WRITE                       0071  Write to a DOS File           LENGTH 37 & LOCAL DOSMESSAGE$           ! Define DOS message                       DOS:WRITE                       0072  Write to a DOS File           !                                                                                  DOS:WRITE                       0073  Write to a DOS File           1000 FORMAT DOSMESSAGE$                 ! File input format                        DOS:WRITE                       0074  Write to a DOS File           !                                                                                  DOS:WRITE                       0075  Write to a DOS File           100 FORMAT (ET)                         ! Screen format                            DOS:WRITE                       0076  Write to a DOS File           !                                                                                  DOS:WRITE                       0077  Write to a DOS File           9999 FORMAT DATASTRING$                 ! File output format                       DOS:WRITE                       0078  Write to a DOS File           !                                                                                  DOS:WRITE                       0079  Write to a DOS File           CLEAR                                   ! Initialize variables                     DOS:WRITE                       0080  Write to a DOS File           PRINT (0,100)                           ! Set typewriter mode                      DOS:WRITE                       0081  Write to a DOS File           !                                                                                  DOS:WRITE                       0082  Write to a DOS File           PRINT (0) "NAME OF DOS FILE TO OPEN:"   ! Display prompt                           DOS:WRITE                       0083  Write to a DOS File           INPUT (0) FILENAME$                     ! Input file name                          DOS:WRITE                       0084  Write to a DOS File           IF FILENAME$ = "" THEN RUN "QMONITOR"   ! If null, then stop                       DOS:WRITE                       0085  Write to a DOS File           !                                                                                  DOS:WRITE                       0086  Write to a DOS File           AX$ = "@3D42@"                          ! Set AX to "OPEN FILE"                    DOS:WRITE                       0087  Write to a DOS File           CX$ = "@0000@"                          ! Set CX to null                           DOS:WRITE                       0088  Write to a DOS File           !                                                                                  DOS:WRITE                       0089  Write to a DOS File           DOSFC(AX$,CX$,FILENAME$) EXCP=EXCEPTION ! Open the file                            DOS:WRITE                       0090  Write to a DOS File           !                                                                                  DOS:WRITE                       0091  Write to a DOS File           FILEHANDLE$ = AX$                       ! Store file handle                        DOS:WRITE                       0092  Write to a DOS File           !                                                                                  DOS:WRITE                       0093  Write to a DOS File           WRITE: PRINT (0) "ENTER STRING TO WRITE TO DOS FILE:"                              DOS:WRITE                       0094  Write to a DOS File                  INPUT (0) DATASTRING$                                                       DOS:WRITE                       0095  Write to a DOS File                  IF DATASTRING$ = "" THEN GOTO BOTTOM                                        DOS:WRITE                       0096  Write to a DOS File           !                                                                                  DOS:WRITE                       0097  Write to a DOS File                  AX$ = "@4000@"                   ! Set AX to "WRITE"                        DOS:WRITE                       0098  Write to a DOS File                  CX$ = "@0000@"                   ! Set CX to null                           DOS:WRITE                       0099  Write to a DOS File           !                                                                                  DOS:WRITE                       0100  Write to a DOS File                  DOSRW(AX$,FILEHANDLE$,100,9999) EXCP=EXCEPTION                              DOS:WRITE                       0101  Write to a DOS File           !                                                                                  DOS:WRITE                       0102  Write to a DOS File           GOTO WRITE                              ! Loop back for more                       DOS:WRITE                       0103  Write to a DOS File           !                                                                                  DOS:WRITE                       0104  Write to a DOS File           BOTTOM: AX$ = "@3E00@"                  ! Set AX to "CLOSE FILE"                   DOS:WRITE                       0105  Write to a DOS File                   BX$ = FILEHANDLE$               ! Set BX to file handle                    DOS:WRITE                       0106  Write to a DOS File                   CX$ = "@0000@"                  ! Set CX to null                           DOS:WRITE                       0107  Write to a DOS File                   DX$ = "@0000@"                  ! Set DX to null                           DOS:WRITE                       0108  Write to a DOS File                   DOSMS(AX$,BX$,CX$,DX$)          ! Close the file                           DOS:WRITE                       0109  Write to a DOS File                   RUN "QMONITOR"                                                             DOS:WRITE                       0110  Write to a DOS File           !                                                                                  DOS:WRITE                       0111  Write to a DOS File           EXCEPTION:                              ! Exception routine                        DOS:WRITE                       0112  Write to a DOS File           PRINT (0) "WRITE EXCEPTION"             ! Display message                          DOS:WRITE                       0113  Write to a DOS File           OPEN (1) "QERCOMET"                     ! Open error file                          DOS:WRITE                       0114  Write to a DOS File           DOSCODE$ = "D" + HEXASC(SUB(AX$,2,1))   ! Construct key to file                    DOS:WRITE                       0115  Write to a DOS File           READ (1,1000) KEY=DOSCODE$              ! Read error record                        DOS:WRITE                       0116  Write to a DOS File           PRINT (0) "DOS error code: ";DOSCODE$   ! Display DOS error code                   DOS:WRITE                       0117  Write to a DOS File           PRINT (0) DOSMESSAGE$                   ! Display error message                    DOS:WRITE                       0118  Write to a DOS File           INPUT (0) ""                            ! Hold                                     DOS:WRITE                       0119  Write to a DOS File           CLOSE (1)                               ! Close error file                         DOS:WRITE                       0120  Write to a DOS File           RUN "QMONITOR"                          ! Exit                                     DOS:WRITE                       0121  Write to a DOS File           END                                                                                DOSFC                           0001                              Syntax:                                                                              DOSFC                           0002                                                                                                                   DOSFC                           0003                                DOSFC(string-1, string-2, string-3)                                                DOSFC                           0004                                     [,EXCP=statement-label]                                                       DOSFC                           0005                                                                                                                   DOSFC                           0006                              Discussion:                                                                          DOSFC                           0007                                                                                                                   DOSFC                           0008                                The DOSFC statement serves as a file call to DOS. It is used to:                   DOSFC                           0009                                <Create DOS files|DOS:CREATE>                                                      DOSFC                           0010                                <Erase DOS files|DOS:ERASE>                                                        DOSFC                           0011                                <Open DOS files|DOS:OPEN>                                                          DOSFC                           0012                                <Create DOS subdirectories|DOS:MKDIR>                                              DOSFC                           0013                                <Remove DOS subdirectories|DOS:RMDIR>                                              DOSFC                           0014                                <Change the current DOS subdirectory|DOS:CHDIR>                                    DOSMS                           0001                              Syntax:                                                                              DOSMS                           0002                                                                                                                   DOSMS                           0003                                DOSMS(string-1,string-2,string-3,string-4)                                         DOSMS                           0004                                     [,EXCP=statement-label]                                                       DOSMS                           0005                                                                                                                   DOSMS                           0006                              Discussion:                                                                          DOSMS                           0007                                                                                                                   DOSMS                           0008                                The DOSMS statement serves as a more general-purpose (or                           DOSMS                           0009                                miscellaneous) host system function call. Applications include:                    DOSMS                           0010                                                                                                                   DOSMS                           0011                                <Closing a file (using the file's handle)|DOS:CLOSE>                               DOSMS                           0012                                <Getting the time|DOS:GETTIME>                                                     DOSMS                           0013                                <Getting the date|DOS:GETDATE>                                                     DOSMS                           0014                                <Moving a file's read/write pointer|DOS:LSEEK>                                     DOSRW                           0001                              Syntax:                                                                              DOSRW                           0002                                                                                                                   DOSRW                           0003                                DOSRW(string-1,string-2,numeric-argument,format-label)                             DOSRW                           0004                                     [,EXCP=statement-label]                                                       DOSRW                           0005                                                                                                                   DOSRW                           0006                              Discussion:                                                                          DOSRW                           0007                                                                                                                   DOSRW                           0008                                The DOSRW statement serves as a means of reading and/or writing a                  DOSRW                           0009                                DOS file from within an MTB program. It can also be used to send                   DOSRW                           0010                                a message to another terminal.                                                     DOSRW                           0011                                                                                                                   DOSRW                           0012                                See the following:                                                                 DOSRW                           0013                                <Read From a DOS File|DOS:READ>                                                    DOSRW                           0014                                <Write to a DOS File|DOS:WRITE>                                                    DOSRW                           0015                                <Send a Message to All Terminals|DOS:MESSAGEALL>                                   DOSRW                           0016                                <Send a Message to Another Terminal|DOS:MESSAGE>                                   Deleting windows                0001                              Deleting windows                                                                     Deleting windows                0002                              ================                                                                     Deleting windows                0003                                                                                                                   Deleting windows                0004                                The <(Delete Window),#HELPMT3> mnemonic deletes a window.                          Deleting windows                0005                                                                                                                   Deleting windows                0006                                Also see <Creating windows>.                                                       Deleting windows                0007                                                                                                                   Deleting windows                0008                              Example:                                                                             Deleting windows                0009                                                                                                                   Deleting windows                0010                                PRINT (0) (Delete Window)                                                          Detecting mouse clicks          0001                              Detecting mouse clicks                                                               Detecting mouse clicks          0002                              ======================                                                               Detecting mouse clicks          0003                                                                                                                   Detecting mouse clicks          0004                                Once the mouse interface is active (see <Open the mouse>), your                    Detecting mouse clicks          0005                                MTB program may detect mouse clicks via scan codes (you do not                     Detecting mouse clicks          0006                                have to activate partial scan codes)                                               Detecting mouse clicks          0007                                                                                                                   Detecting mouse clicks          0008                                Every mouse click (up/down, left/right/center button) generates a                  Detecting mouse clicks          0009                                scan code:                                                                         Detecting mouse clicks          0010                                                                                                                   Detecting mouse clicks          0011                                Scan code    Description                                                           Detecting mouse clicks          0012                                =====================================                                              Detecting mouse clicks          0013                                "@00FE@"     a mouse button is down                                                Detecting mouse clicks          0014                                "@00FF@"     a mouse button is up                                                  Detecting mouse clicks          0015                                                                                                                   Detecting mouse clicks          0016                              Example:                                                                             Detecting mouse clicks          0017                                                                                                                   Detecting mouse clicks          0018                                INPUT (0) DATA$                                                                    Detecting mouse clicks          0019                                IF DATA$ = '@00FE@' THEN MOUSE$ = 'DOWN'                                           Detecting mouse clicks          0020                                IF DATA$ = '@00FF@' THEN MOUSE$ = 'UP'                                             Detecting mouse clicks          0021                                                                                                                   Detecting mouse clicks          0022                              Note:                                                                                Detecting mouse clicks          0023                                                                                                                   Detecting mouse clicks          0024                                Each mouse click also places 4 bytes (binary encoded) into the                     Detecting mouse clicks          0025                                input buffer:                                                                      Detecting mouse clicks          0026                                                                                                                   Detecting mouse clicks          0027                                Byte    Description                                                                Detecting mouse clicks          0028                                ===================================================                                Detecting mouse clicks          0029                                1-2     Screen coordinates where mouse was clicked                                 Detecting mouse clicks          0030                                3       which button was pressed                                                   Detecting mouse clicks          0031                                4       the current state of the mouse buttons                                     Detecting mouse clicks          0032                                                                                                                   Detecting mouse clicks          0033                                See <Reading the mouse> or <Polling the mouse>.                                    Dynamic Driver Libraries        0001                              Dynamic Driver Libraries                                                             Dynamic Driver Libraries        0002                              ========================                                                             Dynamic Driver Libraries        0003                                                                                                                   Dynamic Driver Libraries        0004                                Comet 504 and higher includes a very convenient programming tool:                  Dynamic Driver Libraries        0005                                Dynamic Driver Libraries (DDL). This feature provides a way for                    Dynamic Driver Libraries        0006                                Comet developers to include custom mnemonics in their programs,                    Dynamic Driver Libraries        0007                                and also provides the means for developing custom "drivers" for                    Dynamic Driver Libraries        0008                                printers and other devices. This feature makes the MTB language                    Dynamic Driver Libraries        0009                                extensible.                                                                        Dynamic Driver Libraries        0010                                                                                                                   Dynamic Driver Libraries        0011                                Here are the basic specifications for Dynamic Driver Libraries:                    Dynamic Driver Libraries        0012                                                                                                                   Dynamic Driver Libraries        0013                                1. Comet developers can define a library of custom mnemonics.                      Dynamic Driver Libraries        0014                                   Each mnemonic name may be up to 64 characters long.                             Dynamic Driver Libraries        0015                                                                                                                   Dynamic Driver Libraries        0016                                   For example:  (SINGLEKEYTRANSMIT)                                               Dynamic Driver Libraries        0017                                                                                                                   Dynamic Driver Libraries        0018                                2. When the driver library is processed, all imbedded blanks are                   Dynamic Driver Libraries        0019                                   removed from the mnemonic names and all characters in the                       Dynamic Driver Libraries        0020                                   mnemonic names are converted to upper case. This means that                     Dynamic Driver Libraries        0021                                   you can code the mnemonic names in a more "readable" format.                    Dynamic Driver Libraries        0022                                                                                                                   Dynamic Driver Libraries        0023                                   For example:  (Single Key Transmit)                                             Dynamic Driver Libraries        0024                                                                                                                   Dynamic Driver Libraries        0025                                3. Each mnemonic may include up to 32 arguments. The arguments                     Dynamic Driver Libraries        0026                                   may be string constants or variables or numeric constants or                    Dynamic Driver Libraries        0027                                   variables.                                                                      Dynamic Driver Libraries        0028                                                                                                                   Dynamic Driver Libraries        0029                                   For example:  (Change Colors="07","20","00","00","30")                          Dynamic Driver Libraries        0030                                                                                                                   Dynamic Driver Libraries        0031                                   You can also skip one or more arguments by including the                        Dynamic Driver Libraries        0032                                   appropriate commas:                                                             Dynamic Driver Libraries        0033                                                                                                                   Dynamic Driver Libraries        0034                                   For example:  (Change Colors="07","20",,,)                                      Dynamic Driver Libraries        0035                                                                                                                   Dynamic Driver Libraries        0036                                4. Signature Systems will maintain a "master list" of developer-                   Dynamic Driver Libraries        0037                                   defined mnemonics. This list will include the following items:                  Dynamic Driver Libraries        0038                                                                                                                   Dynamic Driver Libraries        0039                                   a.   the mnemonic name                                                          Dynamic Driver Libraries        0040                                   b.   the number of arguments associated with the mnemonic name                  Dynamic Driver Libraries        0041                                   c.   the type of arguments (string or numeric)                                  Dynamic Driver Libraries        0042                                                                                                                   Dynamic Driver Libraries        0043                                   This master list will be distributed in a file named MTB50.                     Dynamic Driver Libraries        0044                                   Comet developers can request a mnemonic name via the "MTB                       Dynamic Driver Libraries        0045                                   Mnemonic Registration Form."                                                    Dynamic Driver Libraries        0046                                                                                                                   Dynamic Driver Libraries        0047                                5. The actual definition of the mnemonics is done via a new                        Dynamic Driver Libraries        0048                                   mechanism called a "driver mnemonic library." Several driver                    Dynamic Driver Libraries        0049                                   mnemonic libraries have been developed by Signature Systems.                    Dynamic Driver Libraries        0050                                   These libraries are device independent and configurable.                        Dynamic Driver Libraries        0051                                   Thus, Comet developers will be able to create mnemonic driver                   Dynamic Driver Libraries        0052                                   tables for various brands and models of printers, or create                     Dynamic Driver Libraries        0053                                   mnemonic driver tables for other I/O devices. These tables are                  Dynamic Driver Libraries        0054                                   created via a new Comet utility named MNEMGEN.                                  Dynamic Driver Libraries        0055                                                                                                                   Dynamic Driver Libraries        0056                              A quick demonstration                                                                Dynamic Driver Libraries        0057                              =====================                                                                Dynamic Driver Libraries        0058                                                                                                                   Dynamic Driver Libraries        0059                                To help demonstrate this feature, consider the write control that                  Dynamic Driver Libraries        0060                                instructs a Comet workstation to operate in "single key transmit"                  Dynamic Driver Libraries        0061                                mode. Prior to Comet 504, this feature was accomplished via the                    Dynamic Driver Libraries        0062                                following hex write control:                                                       Dynamic Driver Libraries        0063                                                                                                                   Dynamic Driver Libraries        0064                                   "@040002@"                                                                      Dynamic Driver Libraries        0065                                                                                                                   Dynamic Driver Libraries        0066                                However, here is how the feature is implemented via a DDL:                         Dynamic Driver Libraries        0067                                                                                                                   Dynamic Driver Libraries        0068                                1. First, we need to choose a mnemonic name for this feature.                      Dynamic Driver Libraries        0069                                   Signature Systems has created the following mnemonic name for                   Dynamic Driver Libraries        0070                                   this purpose:                                                                   Dynamic Driver Libraries        0071                                                                                                                   Dynamic Driver Libraries        0072                                        (SINGLEKEYTRANSMIT)                                                        Dynamic Driver Libraries        0073                                                                                                                   Dynamic Driver Libraries        0074                                   Note: When this mnemonic is coded in MTB, it can be written in                  Dynamic Driver Libraries        0075                                   upper or lower case or a combination, and can include imbedded                  Dynamic Driver Libraries        0076                                   blanks. Thus, the following mnemonic will create the same                       Dynamic Driver Libraries        0077                                   result:                                                                         Dynamic Driver Libraries        0078                                                                                                                   Dynamic Driver Libraries        0079                                        (Single Key Transmit)                                                      Dynamic Driver Libraries        0080                                                                                                                   Dynamic Driver Libraries        0081                                2. Next, this mnemonic must be registered on the master list (the                  Dynamic Driver Libraries        0082                                   MTB50 file).  The registration includes the mnemonic name and                   Dynamic Driver Libraries        0083                                   the number and type of arguments.  In this case, there are no                   Dynamic Driver Libraries        0084                                   arguments, so the definition includes only the mnemonic name.                   Dynamic Driver Libraries        0085                                                                                                                   Dynamic Driver Libraries        0086                                   Note: Once a mnemonic is registered in the MTB50 file, it will                  Dynamic Driver Libraries        0087                                   be recognized by the MTB compiler.  However, the actual                         Dynamic Driver Libraries        0088                                   definition of the mnemonic occurs at the next step.                             Dynamic Driver Libraries        0089                                                                                                                   Dynamic Driver Libraries        0090                                3. Now we must create the exact definition for the new mnemonic.                   Dynamic Driver Libraries        0091                                   This is done by creating a dynamic driver library.                              Dynamic Driver Libraries        0092                                                                                                                   Dynamic Driver Libraries        0093                                   a.   First, we must create an editor file and enter the                         Dynamic Driver Libraries        0094                                        mnemonic definition(s) using the mnemonic code generator                   Dynamic Driver Libraries        0095                                        "language." For this example, the source lines are:                        Dynamic Driver Libraries        0096                                                                                                                   Dynamic Driver Libraries        0097                                             [Single Key Transmit]                                                 Dynamic Driver Libraries        0098                                             Print "@040002@"                                                      Dynamic Driver Libraries        0099                                                                                                                   Dynamic Driver Libraries        0100                                        The first line contains the mnemonic name within square                    Dynamic Driver Libraries        0101                                        brackets, and the second line contains the action to be                    Dynamic Driver Libraries        0102                                        taken (in this case, the printing of the hex sequence for                  Dynamic Driver Libraries        0103                                        single key transmit mode).                                                 Dynamic Driver Libraries        0104                                                                                                                   Dynamic Driver Libraries        0105                                   b.   Once the source file definitions are written, we must use                  Dynamic Driver Libraries        0106                                        the new utility program named MNEMGEN to process the                       Dynamic Driver Libraries        0107                                        mnemonic definitions. This program reads the source file                   Dynamic Driver Libraries        0108                                        and creates the DDL (an output file with tokenized                         Dynamic Driver Libraries        0109                                        representations of the mnemonics). In this regard,                         Dynamic Driver Libraries        0110                                        MNEMGEN functions like a compiler program, albeit a very                   Dynamic Driver Libraries        0111                                        simple one.                                                                Dynamic Driver Libraries        0112                                                                                                                   Dynamic Driver Libraries        0113                                   c.   In the case of printer drivers, you can use the new                        Dynamic Driver Libraries        0114                                        version of QCFIG to configure a driver for each type and                   Dynamic Driver Libraries        0115                                        brand of printer you have. This means that you can                         Dynamic Driver Libraries        0116                                        register one mnemonic (e.g., LANDSCAPE), but create                        Dynamic Driver Libraries        0117                                        multiple printer drivers for your system by creating and                   Dynamic Driver Libraries        0118                                        "compiling" multiple DDLs.                                                 Dynamic Driver Libraries        0119                                                                                                                   Dynamic Driver Libraries        0120                              Other examples                                                                       Dynamic Driver Libraries        0121                              ==============                                                                       Dynamic Driver Libraries        0122                                                                                                                   Dynamic Driver Libraries        0123                                Consider the "shell to DOS" feature. This feature is invoked via                   Dynamic Driver Libraries        0124                                the following hex write control:                                                   Dynamic Driver Libraries        0125                                                                                                                   Dynamic Driver Libraries        0126                                   "@0E0E0A00@"                                                                    Dynamic Driver Libraries        0127                                                                                                                   Dynamic Driver Libraries        0128                                However, with the advent of DDLs, we can create a mnemonic for                     Dynamic Driver Libraries        0129                                this purpose. In fact, Signature Systems has done just that.  The                  Dynamic Driver Libraries        0130                                following mnemonic is available:                                                   Dynamic Driver Libraries        0131                                                                                                                   Dynamic Driver Libraries        0132                                   (Shell to DOS="DOS-command")                                                    Dynamic Driver Libraries        0133                                                                                                                   Dynamic Driver Libraries        0134                                Notice that this mnemonic contains one argument, a string                          Dynamic Driver Libraries        0135                                containing a DOS command. If this argument contains a null value,                  Dynamic Driver Libraries        0136                                the program will shell to DOS without executing a DOS command.                     Dynamic Driver Libraries        0137                                                                                                                   Dynamic Driver Libraries        0138                                In order for this mnemonic to work, we must add a definition to                    Dynamic Driver Libraries        0139                                the driver library. The following source lines show the                            Dynamic Driver Libraries        0140                                definition for this mnemonic:                                                      Dynamic Driver Libraries        0141                                                                                                                   Dynamic Driver Libraries        0142                                   [Shell to DOS=ARG1$]                                                            Dynamic Driver Libraries        0143                                   Print "@0E0E0A00@"                                                              Dynamic Driver Libraries        0144                                   Print ARG1$                                                                     Dynamic Driver Libraries        0145                                                                                                                   Dynamic Driver Libraries        0146                                Notice the format for the argument. Mnemonic arguments are                         Dynamic Driver Libraries        0147                                written as ARG1$ through ARG32$ (for strings) or ARG1 through                      Dynamic Driver Libraries        0148                                ARG32 (for numerics). Arguments are included in the first line of                  Dynamic Driver Libraries        0149                                the mnemonic definition as shown above.                                            Dynamic Driver Libraries        0150                                                                                                                   Dynamic Driver Libraries        0151                                As before, this definition must be processed by the MNEMGEN                        Dynamic Driver Libraries        0152                                mnemonic code generator program.                                                   Dynamic Driver Libraries        0153                                                                                                                   Dynamic Driver Libraries        0154                              Multiple parameters                                                                  Dynamic Driver Libraries        0155                              ===================                                                                  Dynamic Driver Libraries        0156                                                                                                                   Dynamic Driver Libraries        0157                                Consider an mnemonic with multiple parameters. Prior to Comet                      Dynamic Driver Libraries        0158                                504, the following hex write control was used to create a window                   Dynamic Driver Libraries        0159                                in MTB:                                                                            Dynamic Driver Libraries        0160                                                                                                                   Dynamic Driver Libraries        0161                                   "@0E0D00wwxxyyzz@"                                                              Dynamic Driver Libraries        0162                                                                                                                   Dynamic Driver Libraries        0163                                   where:    ww and xx are the Y and X coordinates of the upper                    Dynamic Driver Libraries        0164                                             left corner of the window, and yy and zz are the Y                    Dynamic Driver Libraries        0165                                             and X coordinates of the lower right corner (ww, xx,                  Dynamic Driver Libraries        0166                                             yy, and zz are in hex)                                                Dynamic Driver Libraries        0167                                                                                                                   Dynamic Driver Libraries        0168                                Signature Systems created a mnemonic for this same objective. The                  Dynamic Driver Libraries        0169                                following mnemonic contains 4 arguments:                                           Dynamic Driver Libraries        0170                                                                                                                   Dynamic Driver Libraries        0171                                   (Create Window=ww,xx,yy,zz)                                                     Dynamic Driver Libraries        0172                                                                                                                   Dynamic Driver Libraries        0173                                The driver library entry for this mnemonic is:                                     Dynamic Driver Libraries        0174                                                                                                                   Dynamic Driver Libraries        0175                                   [Create Window=ARG1,ARG2,ARG3,ARG4]                                             Dynamic Driver Libraries        0176                                   Print "@0E0D00@"                                                                Dynamic Driver Libraries        0177                                   Printhex ARG1                                                                   Dynamic Driver Libraries        0178                                   Printhex ARG2                                                                   Dynamic Driver Libraries        0179                                   Printhex ARG3                                                                   Dynamic Driver Libraries        0180                                   Printhex ARG4                                                                   Dynamic Driver Libraries        0181                                   Print "@00@"                                                                    Dynamic Driver Libraries        0182                                                                                                                   Dynamic Driver Libraries        0183                                Notice how the 4 numeric arguments are listed on the first line.                   Dynamic Driver Libraries        0184                                Also notice the use of the PRINTHEX command within the                             Dynamic Driver Libraries        0185                                definition. This statement converts a decimal argument to its hex                  Dynamic Driver Libraries        0186                                equivalent (e.g., PRINTHEX 20 would convert the 20 decimal to 14                   Dynamic Driver Libraries        0187                                hex).                                                                              Dynamic Driver Libraries        0188                                                                                                                   Dynamic Driver Libraries        0189                                The final line of the definition prints a null in order to                         Dynamic Driver Libraries        0190                                suppress blank stripping during a formatted WRITE.                                 Dynamic Driver Libraries        0191                                                                                                                   Dynamic Driver Libraries        0192                              DDL specification language                                                           Dynamic Driver Libraries        0193                              ==========================                                                           Dynamic Driver Libraries        0194                                                                                                                   Dynamic Driver Libraries        0195                                Dynamic Driver Libraries are created using a simple programming                    Dynamic Driver Libraries        0196                                language. There are 3 programming statements in the language:                      Dynamic Driver Libraries        0197                                                                                                                   Dynamic Driver Libraries        0198                                PRINT             prints a string of characters or digits                          Dynamic Driver Libraries        0199                                                                                                                   Dynamic Driver Libraries        0200                                PRINTHEX          converts a numeric argument from decimal to its                  Dynamic Driver Libraries        0201                                                  hex equivalent and prints the hex string                         Dynamic Driver Libraries        0202                                                                                                                   Dynamic Driver Libraries        0203                                CTLTODRIVER       writes a control code to a specialized driver                    Dynamic Driver Libraries        0204                                                  (currently this is only used for the fax                         Dynamic Driver Libraries        0205                                                  driver)                                                          Dynamic Driver Libraries        0206                                                                                                                   Dynamic Driver Libraries        0207                                In addition, the mnemonic names are included within square                         Dynamic Driver Libraries        0208                                brackets as follows:                                                               Dynamic Driver Libraries        0209                                                                                                                   Dynamic Driver Libraries        0210                                   [Mnemonic=argument-1,argument-2,argument-3,...argument-32]                      Dynamic Driver Libraries        0211                                                                                                                   Dynamic Driver Libraries        0212                                   where:    argument-1 may be written as ARG1 or ARG1$, etc.                      Dynamic Driver Libraries        0213                                                                                                                   Dynamic Driver Libraries        0214                                Comment lines may be included within a mnemonic definition source                  Dynamic Driver Libraries        0215                                file.  These lines must begin with a semicolon (;).                                Dynamic Driver Libraries        0216                                                                                                                   Dynamic Driver Libraries        0217                                Each DDL source file should begin with a DEVICE command                            Dynamic Driver Libraries        0218                                indicating the name of the driver. (Technically, this is an                        Dynamic Driver Libraries        0219                                optional command, but we recommend that you include it in your                     Dynamic Driver Libraries        0220                                driver source code.) The syntax for this statement is:                             Dynamic Driver Libraries        0221                                                                                                                   Dynamic Driver Libraries        0222                                   [DEVICE="name of driver table"]                                                 Dynamic Driver Libraries        0223                                                                                                                   Dynamic Driver Libraries        0224                                   For example:  [DEVICE="FAX DRIVER MNEMONICS"]                                   Dynamic Driver Libraries        0225                                                                                                                   Dynamic Driver Libraries        0226                              DDL for a printer                                                                    Dynamic Driver Libraries        0227                              =================                                                                    Dynamic Driver Libraries        0228                                                                                                                   Dynamic Driver Libraries        0229                                Initialization and shutdown mnemonics                                              Dynamic Driver Libraries        0230                                -------------------------------------                                              Dynamic Driver Libraries        0231                                                                                                                   Dynamic Driver Libraries        0232                                When creating a Dynamic Device Library for a printer, the                          Dynamic Driver Libraries        0233                                following mnemonics are available for printer initialization and                   Dynamic Driver Libraries        0234                                shutdown:                                                                          Dynamic Driver Libraries        0235                                                                                                                   Dynamic Driver Libraries        0236                                Mnemonic          Description                                                      Dynamic Driver Libraries        0237                                =================================================================                  Dynamic Driver Libraries        0238                                                                                                                   Dynamic Driver Libraries        0239                                INIT              Available as an initialization command for the                   Dynamic Driver Libraries        0240                                                  printer.  This can be used to send a specific                    Dynamic Driver Libraries        0241                                                  initialization string to the printer (as                         Dynamic Driver Libraries        0242                                                  required by some brands of laser printers, for                   Dynamic Driver Libraries        0243                                                  example), and can also be used to send a                         Dynamic Driver Libraries        0244                                                  CtlToDriver command (see next page) to specify                   Dynamic Driver Libraries        0245                                                  the mode for initial form-feeds.                                 Dynamic Driver Libraries        0246                                                                                                                   Dynamic Driver Libraries        0247                                                  The initialization information is written to                     Dynamic Driver Libraries        0248                                                  the printer before the first WRITE of a "non-                    Dynamic Driver Libraries        0249                                                  frivolous" OPEN.  For example, a "frivolous"                     Dynamic Driver Libraries        0250                                                  OPEN command looks like this in MTB:                             Dynamic Driver Libraries        0251                                                                                                                   Dynamic Driver Libraries        0252                                                  OPEN (1) "LP1",EXCP=NOPRINTER & CLOSE (1)                        Dynamic Driver Libraries        0253                                                                                                                   Dynamic Driver Libraries        0254                                SHUTDOWN          Available as a termination command for the                       Dynamic Driver Libraries        0255                                                  printer.  This can be used to send a specific                    Dynamic Driver Libraries        0256                                                  string to the printer when the printer is                        Dynamic Driver Libraries        0257                                                  closed, and can also be used to send a                           Dynamic Driver Libraries        0258                                                  CtlToDriver command (see next page) to specify                   Dynamic Driver Libraries        0259                                                  the mode for trailing form-feeds.                                Dynamic Driver Libraries        0260                                                                                                                   Dynamic Driver Libraries        0261                                Note: Once executed, these actions last on a printer until they                    Dynamic Driver Libraries        0262                                are changed or until you exit from Comet.                                          Dynamic Driver Libraries        0263                                                                                                                   Dynamic Driver Libraries        0264                                Initial and trailing form-feeds                                                    Dynamic Driver Libraries        0265                                -------------------------------                                                    Dynamic Driver Libraries        0266                                                                                                                   Dynamic Driver Libraries        0267                                When creating a Dynamic Device Library for a printer, the                          Dynamic Driver Libraries        0268                                following controls are available for setting the initial and                       Dynamic Driver Libraries        0269                                trailing form-feeds:                                                               Dynamic Driver Libraries        0270                                                                                                                   Dynamic Driver Libraries        0271                                Control                Description                                                 Dynamic Driver Libraries        0272                                =================================================================                  Dynamic Driver Libraries        0273                                CtlToDriver '@01@'     suppresses initial form-feed                                Dynamic Driver Libraries        0274                                CtlToDriver '@02@'     allows initial form-feed                                    Dynamic Driver Libraries        0275                                CtlToDriver '@03@'     adds trailing form-feed                                     Dynamic Driver Libraries        0276                                CtlToDriver '@04@'     doesn't add trailing form-feed                              Dynamic Driver Libraries        0277                                                                                                                   Dynamic Driver Libraries        0278                                Example:                                                                           Dynamic Driver Libraries        0279                                                                                                                   Dynamic Driver Libraries        0280                                To define a DDL that suppresses initial form-feeds and adds                        Dynamic Driver Libraries        0281                                trailing form-feeds, your DDL source code would contain the                        Dynamic Driver Libraries        0282                                following statements:                                                              Dynamic Driver Libraries        0283                                                                                                                   Dynamic Driver Libraries        0284                                [INIT]                                                                             Dynamic Driver Libraries        0285                                CtlToDriver '@01@'                                                                 Dynamic Driver Libraries        0286                                                                                                                   Dynamic Driver Libraries        0287                                [SHUTDOWN]                                                                         Dynamic Driver Libraries        0288                                CtlToDriver '@03@'                                                                 Enhanced Character Set          0001                              Enhanced Character Set                                                               Enhanced Character Set          0002                              =======================                                                              Enhanced Character Set          0003                                                                                                                   Enhanced Character Set          0004                                Comet supports an enhanced character set for the console screen.                   Enhanced Character Set          0005                                This character set includes graphics characters/symbols such as                    Enhanced Character Set          0006                                boxes, buttons, lines, corners, etc. Many of these symbols are                     Enhanced Character Set          0007                                typically used for mouse-oriented applications.                                    Enhanced Character Set          0008                                                                                                                   Enhanced Character Set          0009                                For a complete list of the enhanced characters, see the                            Enhanced Character Set          0010                                <Enhanced Character Set chart|Enhanced Character Set,#HELPMT6>.                    Enhanced Character Set          0011                                                                                                                   Enhanced Character Set          0012                                There are two primary mnemonics that control the enhanced                          Enhanced Character Set          0013                                character set:                                                                     Enhanced Character Set          0014                                                                                                                   Enhanced Character Set          0015                                   <(Enhanced Characters On),#HELPMT3>                                             Enhanced Character Set          0016                                   <(Enhanced Characters Off),#HELPMT3>                                            Enhanced Character Set          0017                                                                                                                   Enhanced Character Set          0018                                In addition, there are several mnemonics that display common                       Enhanced Character Set          0019                                graphical symbols, including:                                                      Enhanced Character Set          0020                                                                                                                   Enhanced Character Set          0021                                   <(Check Box Off),#HELPMT3>                                                      Enhanced Character Set          0022                                   <(Check Box On),#HELPMT3>                                                       Enhanced Character Set          0023                                   <(Close Icon),#HELPMT3>                                                         Enhanced Character Set          0024                                   <(Radio Button Off),#HELPMT3>                                                   Enhanced Character Set          0025                                   <(Radio Button On),#HELPMT3>                                                    Fax demo program                0001                              Fax Demo program                                                                     Fax demo program                0002                              ================                                                                     Fax demo program                0003                                                                                                                   Fax demo program                0004                                To help demonstrate the fax mnemonics, Signature Systems has                       Fax demo program                0005                                developed a simple utility program named FAXDEMO (source file                      Fax demo program                0006                                name is XFAXDEMO). The user interface is based on the Comet                        Fax demo program                0007                                Electronic Mail system. You can run this program to see how to                     Fax demo program                0008                                send a fax from Comet and/or study the source code to see how the                  Fax demo program                0009                                fax mnemonics are implemented.                                                     Fax driver                      0001                              Fax driver                                                                           Fax driver                      0002                              ==========                                                                           Fax driver                      0003                                                                                                                   Fax driver                      0004                                Comet includes a fax driver that allows an MTB program to send a                   Fax driver                      0005                                fax via a "CAS-compatible" fax modem.                                              Fax driver                      0006                                                                                                                   Fax driver                      0007                                The Comet Fax Driver includes the following features:                              Fax driver                      0008                                                                                                                   Fax driver                      0009                                *  fax text directly from any MTB program                                          Fax driver                      0010                                *  fax a text file via the Comet Fax Driver                                        Fax driver                      0011                                *  include a fax cover page with TO and FROM fields, and lines of                  Fax driver                      0012                                   text                                                                            Fax driver                      0013                                *  Include a PCX graphics file on the cover page (e.g., a company                  Fax driver                      0014                                   logo)                                                                           Fax driver                      0015                                *  Include PCX graphics files in the body of the fax                               Fax driver                      0016                                *  Include page headers on the fax                                                 Fax driver                      0017                                *  Transmit in normal or fine resolution                                           Fax driver                      0018                                *  Transmit the fax immediately or schedule transmission for a                     Fax driver                      0019                                   future time/date                                                                Fax driver                      0020                                *  Save or delete transmitted faxes                                                Fax driver                      0021                                                                                                                   Fax driver                      0022                                Comet communicates with the fax modem via a TSR program usually                    Fax driver                      0023                                supplied with the fax modem itself. This program, which is based                   Fax driver                      0024                                on the based on the "Communicating Application Specification                       Fax driver                      0025                                (CAS)" standard developed by Intel and DCA, is hereinafter                         Fax driver                      0026                                referred to as the "CAS Manager."                                                  Fax driver                      0027                                                                                                                   Fax driver                      0028                                The original implementations of the CAS standard were for the                      Fax driver                      0029                                Intel SatisFAXtion and NetSatisFAXtion fax modems. As additional                   Fax driver                      0030                                CAS-compatible modems and software become known to Signature                       Fax driver                      0031                                Systems, we will inform you of these products.                                     Fax driver                      0032                                                                                                                   Fax driver                      0033                                Here are the basic steps for configuring the Comet Fax Driver:                     Fax driver                      0034                                                                                                                   Fax driver                      0035                                1. Load Comet.                                                                     Fax driver                      0036                                                                                                                   Fax driver                      0037                                2. Configure a fax device in QCFIG. The fax device is configured                   Fax driver                      0038                                   as a "printer" and is named the same as Comet printers (e.g.,                   Fax driver                      0039                                   LP1, LP2, LP3), however the configuration program contains a                    Fax driver                      0040                                   field indicating that the "printer" is actually a fax device.                   Fax driver                      0041                                                                                                                   Fax driver                      0042                                3. Exit Comet.                                                                     Fax driver                      0043                                                                                                                   Fax driver                      0044                                Here are the basic steps for using the Comet Fax Driver:                           Fax driver                      0045                                                                                                                   Fax driver                      0046                                1. Prior to running Comet, load the CAS Manager (i.e., the TSR                     Fax driver                      0047                                   program). For example, on Signature's in-house test system (an                  Fax driver                      0048                                   Intel SatisFAXtion 400e fax modem), the program is called                       Fax driver                      0049                                   CASMODEM.                                                                       Fax driver                      0050                                                                                                                   Fax driver                      0051                                   For a Comet system within a network, where the fax board is                     Fax driver                      0052                                   contained in a "fax server," use the network fax CAS Manager                    Fax driver                      0053                                   (e.g., the TSR program included with NetSatisFAXtion).                          Fax driver                      0054                                                                                                                   Fax driver                      0055                                2. Load Comet.                                                                     Fax driver                      0056                                                                                                                   Fax driver                      0057                                3. Write or run an MTB program that communicates with the fax                      Fax driver                      0058                                   device, as follows:                                                             Fax driver                      0059                                                                                                                   Fax driver                      0060                                   a.   OPEN the fax device                                                        Fax driver                      0061                                                                                                                   Fax driver                      0062                                        For example:                                                               Fax driver                      0063                                                                                                                   Fax driver                      0064                                             OPEN (1) "LP3",EXCP=9999 ! open fax device                            Fax driver                      0065                                                                                                                   Fax driver                      0066                                        Notes:                                                                     Fax driver                      0067                                                                                                                   Fax driver                      0068                                        1.   If the CAS Manager (TSR program) has not been                         Fax driver                      0069                                             loaded, this instruction will produce an E30                          Fax driver                      0070                                             exception.                                                            Fax driver                      0071                                                                                                                   Fax driver                      0072                                        2.   The fax device is a "virtual" device, which means it                  Fax driver                      0073                                             can be opened by more than one user at a time. In                     Fax driver                      0074                                             effect, the fax device works very much like a print                   Fax driver                      0075                                             spooler.                                                              Fax driver                      0076                                                                                                                   Fax driver                      0077                                        3.   The DSTAT function includes fields that identify fax                  Fax driver                      0078                                             devices, as follows:                                                  Fax driver                      0079                                                                                                                   Fax driver                      0080                                             Position  Description                                                 Fax driver                      0081                                                                                                                   Fax driver                      0082                                             1-3       Last partition to open fax device                           Fax driver                      0083                                             4         F = fax device                                              Fax driver                      0084                                             5         1 = Intel CAS-compatible fax board                          Fax driver                      0085                                                                                                                   Fax driver                      0086                                   b.   WRITE information and/or commands to the fax device                        Fax driver                      0087                                                                                                                   Fax driver                      0088                                        The Comet Fax Driver provides mnemonics that let you                       Fax driver                      0089                                        specify the phone number, the TO and FROM information,                     Fax driver                      0090                                        text and/or graphics for the cover page, text and or                       Fax driver                      0091                                        graphics for the fax itself, and other parameters for the                  Fax driver                      0092                                        fax (headers, resolution, sending time/date, deletion                      Fax driver                      0093                                        options, etc.).                                                            Fax driver                      0094                                                                                                                   Fax driver                      0095                                        The minimum information needed by the fax driver is:                       Fax driver                      0096                                        *    phone number                                                          Fax driver                      0097                                        *    text for the fax                                                      Fax driver                      0098                                                                                                                   Fax driver                      0099                                        For example, to specify the fax phone number, use either                   Fax driver                      0100                                        of the following instructions:                                             Fax driver                      0101                                                                                                                   Fax driver                      0102                                             PRINT (1) (FAX Phone="1-707-874-1369")                                Fax driver                      0103                                                                                                                   Fax driver                      0104                                             or                                                                    Fax driver                      0105                                                                                                                   Fax driver                      0106                                             PRINT (1) (FAX Phone=PHONE$)                                          Fax driver                      0107                                                                                                                   Fax driver                      0108                                        In this case, the mnemonic is named (FAX Phone) and it                     Fax driver                      0109                                        includes one argument, a string containing the fax phone                   Fax driver                      0110                                        number. This argument may be a constant (first example)                    Fax driver                      0111                                        or a variable (second example).                                            Fax driver                      0112                                                                                                                   Fax driver                      0113                                        Write the "body" of the fax as follows:                                    Fax driver                      0114                                                                                                                   Fax driver                      0115                                             PRINT (1) "This is the first line."                                   Fax driver                      0116                                             PRINT (1) "This is the second line."                                  Fax driver                      0117                                             PRINT (1) "This is the third line."                                   Fax driver                      0118                                             PRINT (1) "This is the fourth line."                                  Fax driver                      0119                                             PRINT (1) "This is the fifth line."                                   Fax driver                      0120                                                                                                                   Fax driver                      0121                                        Additional information can be specified using other fax                    Fax driver                      0122                                        mnemonics (see below), but none of these additional items                  Fax driver                      0123                                        is required by the fax driver.                                             Fax driver                      0124                                                                                                                   Fax driver                      0125                                   c.   When all of the information has been written, submit the                   Fax driver                      0126                                        fax job to the CAS Manager using the (FAX Submit Job)                      Fax driver                      0127                                        mnemonic. This action signals the CAS Manager to queue                     Fax driver                      0128                                        the job and begin sending the fax (unless you have                         Fax driver                      0129                                        specified a future date/time).                                             Fax driver                      0130                                                                                                                   Fax driver                      0131                                        For example:                                                               Fax driver                      0132                                                                                                                   Fax driver                      0133                                             PRINT (1) (FAX Submit Job)    ! submit fax job                        Fax driver                      0134                                                                                                                   Fax driver                      0135                                        Once the job is submitted, additional mnemonics may be                     Fax driver                      0136                                        used to inquire about the status of the fax job and/or                     Fax driver                      0137                                        delete the fax job. See below for more information on                      Fax driver                      0138                                        these mnemonics.                                                           Fax driver                      0139                                                                                                                   Fax driver                      0140                                   d.   When the fax process is complete, CLOSE the fax device as                  Fax driver                      0141                                        follows:                                                                   Fax driver                      0142                                                                                                                   Fax driver                      0143                                        Example:                                                                   Fax driver                      0144                                                                                                                   Fax driver                      0145                                             CLOSE (1)                ! close fax device                           Fax driver                      0146                                                                                                                   Fax driver                      0147                                        Note:  If you haven't written a FAX PHONE instruction to                   Fax driver                      0148                                        the fax device, your program will generate an exception                    Fax driver                      0149                                        upon closing the fax device. Therefore, we suggest that                    Fax driver                      0150                                        you include an ERRORTO statement in your program to                        Fax driver                      0151                                        handle this potential exception.                                           Fax driver                      0152                                                                                                                   Fax driver                      0153                                   e.   Additional fax mnemonics                                                   Fax driver                      0154                                                                                                                   Fax driver                      0155                                        As mentioned above, the fax driver provides mnemonics to                   Fax driver                      0156                                        control all aspects of the fax board. Here are a few                       Fax driver                      0157                                        short examples of how these mnemonics can be used.                         Fax driver                      0158                                                                                                                   Fax driver                      0159                                        For a complete list, see <Fax mnemonics>.                                  Fax driver                      0160                                                                                                                   Fax driver                      0161                                        *    To specify the name of the fax sender, use the                        Fax driver                      0162                                             following instruction:                                                Fax driver                      0163                                                                                                                   Fax driver                      0164                                                  PRINT (1) (FAX From=FROM$)                                       Fax driver                      0165                                                                                                                   Fax driver                      0166                                             where FROM$ is a user-defined string                                  Fax driver                      0167                                                                                                                   Fax driver                      0168                                        *    To specify the name of the fax recipient, use the                     Fax driver                      0169                                             following instruction:                                                Fax driver                      0170                                                                                                                   Fax driver                      0171                                                  PRINT (1) (FAX To=TO$)                                           Fax driver                      0172                                                                                                                   Fax driver                      0173                                             where TO$ is a user-defined string                                    Fax driver                      0174                                                                                                                   Fax driver                      0175                                        *    To send a fax in fine resolution (196 lines per                       Fax driver                      0176                                             inch), use the following instruction:                                 Fax driver                      0177                                                                                                                   Fax driver                      0178                                                  PRINT (1) (FAX Fine Resolution)                                  Fax driver                      0179                                                                                                                   Fax driver                      0180                                        *    To include a cover page, include the following                        Fax driver                      0181                                             instruction:                                                          Fax driver                      0182                                                                                                                   Fax driver                      0183                                                  PRINT (1) (FAX Cover Page)                                       Fax driver                      0184                                                                                                                   Fax driver                      0185                                        *    To print text on the cover page, include the                          Fax driver                      0186                                             following:                                                            Fax driver                      0187                                                                                                                   Fax driver                      0188                                                  PRINT (1) (FAX Cover Text="Line 1...")                           Fax driver                      0189                                                  PRINT (1) (FAX Cover Text="Line 2...")                           Fax driver                      0190                                                  PRINT (1) (FAX Cover Text="Line 3...")                           Fax driver                      0191                                                  PRINT (1) (FAX Cover Text="Line 4...")                           Fax driver                      0192                                                                                                                   Fax driver                      0193                                        *    To include a PCX graphic on the cover page of the                     Fax driver                      0194                                             fax, use the following instruction:                                   Fax driver                      0195                                                                                                                   Fax driver                      0196                                                  PRINT (1) (FAX Logo File=LOGOFILE$)                              Fax driver                      0197                                                                                                                   Fax driver                      0198                                             where LOGOFILE$ is a user-defined variable that                       Fax driver                      0199                                             contains the full path name/file name of a PCX                        Fax driver                      0200                                             graphics file (e.g., c:\graphics\logo.pcx).                           Fax driver                      0201                                                                                                                   Fax driver                      0202                                        *    Once a fax job has been submitted to the CAS                          Fax driver                      0203                                             Manager, the job's "event handle" may be obtained as                  Fax driver                      0204                                             follows:                                                              Fax driver                      0205                                                                                                                   Fax driver                      0206                                                  PRINT (1) (FAX Submit Job)    ! submit fax job                   Fax driver                      0207                                                  INPUT (1) EVHANDLE$      ! get event handle                      Fax driver                      0208                                                                                                                   Fax driver                      0209                                             where EVHANDLE$ is a user-defined variable (2 bytes)                  Fax driver                      0210                                             containing a hex value associated with the fax job                    Fax driver                      0211                                             that has just been submitted (in essence, a "fax job                  Fax driver                      0212                                             identification number").                                              Fax driver                      0213                                                                                                                   Fax driver                      0214                                             The event handle may be used to inquire about the                     Fax driver                      0215                                             queued fax job as follows:                                            Fax driver                      0216                                                                                                                   Fax driver                      0217                                                  PRINT (1) (FAX Job Status=EVHANDLE$)                             Fax driver                      0218                                                                                                                   Fax driver                      0219                                                  This instruction returns the complete CAS                        Fax driver                      0220                                                  Control File structure in a subsequent READ.                     Fax driver                      0221                                                  This control structure is described in the                       Fax driver                      0222                                                  <CAS Control File> documentation.                                Fax driver                      0223                                                                                                                   Fax driver                      0224                                             The event handle may also be used to delete a queued                  Fax driver                      0225                                             fax job as follows (assuming that the fax has not                     Fax driver                      0226                                             been transmitted):                                                    Fax driver                      0227                                                                                                                   Fax driver                      0228                                                  PRINT (1) (FAX Delete Job=EVHANDLE$)                             Fax driver                      0229                                                                                                                   Fax driver                      0230                                             The event handle is a useful feature for managing                     Fax driver                      0231                                             faxes in the CAS Manager's queue. Ideally, your                       Fax driver                      0232                                             programs should obtain and save (in a data file) the                  Fax driver                      0233                                             event handle for each fax sent. You could then write                  Fax driver                      0234                                             a simple fax management "utility" program to inquire                  Fax driver                      0235                                             on the status of your pending fax jobs.                               Fax driver                      0236                                                                                                                   Fax driver                      0237                                   f.   Also see the <Fax demo program>.                                           Fax driver                      0238                                                                                                                   Fax driver                      0239                                   g.   Summary                                                                    Fax driver                      0240                                                                                                                   Fax driver                      0241                                        The minimum instructions needed to send a fax are:                         Fax driver                      0242                                                                                                                   Fax driver                      0243                                        *    OPEN the fax device                                                   Fax driver                      0244                                        *    WRITE the (FAX Phone=PHONE$) mnemonic                                 Fax driver                      0245                                        *    WRITE text lines to the fax device                                    Fax driver                      0246                                        *    Submit the fax job to the CAS Manager                                 Fax driver                      0247                                        *    CLOSE the fax device                                                  Fax driver                      0248                                                                                                                   Fax driver                      0249                                        The following default values are assumed for the fax                       Fax driver                      0250                                        device:                                                                    Fax driver                      0251                                                                                                                   Fax driver                      0252                                        *    normal resolution (98 lines per inch)                                 Fax driver                      0253                                        *    include page headers                                                  Fax driver                      0254                                        *    delete fax files after the fax is sent                                Fax driver                      0255                                        *    don't include a cover page                                            Fax driver                      0256                                        *    the fax send time/date is the current time/date                       Fax driver                      0257                                             (i.e., queue for "immediate" transmission)                            Fax mnemonics                   0001                              Fax mnemonics                                                                        Fax mnemonics                   0002                              =============                                                                        Fax mnemonics                   0003                                                                                                                   Fax mnemonics                   0004                                The following MTB mnemonics are available through the Comet Fax                    Fax mnemonics                   0005                                DDL.                                                                               Fax mnemonics                   0006                                                                                                                   Fax mnemonics                   0007                                Note: These fax mnemonics can be written to the fax device in any                  Fax mnemonics                   0008                                sequence.                                                                          Fax mnemonics                   0009                                                                                                                   Fax mnemonics                   0010                                   <(FAX Config File),#HELPMT3>                                                    Fax mnemonics                   0011                                   <(FAX Cover Page),#HELPMT3>                                                     Fax mnemonics                   0012                                   <(FAX Cover Text),#HELPMT3>                                                     Fax mnemonics                   0013                                   <(FAX Delete),#HELPMT3>                                                         Fax mnemonics                   0014                                   <(FAX Delete Job),#HELPMT3>                                                     Fax mnemonics                   0015                                   <(FAX Delete On Send),#HELPMT3>                                                 Fax mnemonics                   0016                                   <(FAX Fine Resolution),#HELPMT3>                                                Fax mnemonics                   0017                                   <(FAX From),#HELPMT3>                                                           Fax mnemonics                   0018                                   <(FAX Get Job Status),#HELPMT3>                                                 Fax mnemonics                   0019                                   <(FAX Logo File),#HELPMT3>                                                      Fax mnemonics                   0020                                   <(FAX No Cover Page),#HELPMT3>                                                  Fax mnemonics                   0021                                   <(FAX No Delete),#HELPMT3>                                                      Fax mnemonics                   0022                                   <(FAX No Page Headers),#HELPMT3>                                                Fax mnemonics                   0023                                   <(FAX Normal Resolution),#HELPMT3>                                              Fax mnemonics                   0024                                   <(FAX Page Headers),#HELPMT3>                                                   Fax mnemonics                   0025                                   <(FAX PCX File),#HELPMT3>                                                       Fax mnemonics                   0026                                   <(FAX Phone),#HELPMT3>                                                          Fax mnemonics                   0027                                   <(FAX Send Date),#HELPMT3>                                                      Fax mnemonics                   0028                                   <(FAX Send Time),#HELPMT3>                                                      Fax mnemonics                   0029                                   <(FAX Submit Job),#HELPMT3>                                                     Fax mnemonics                   0030                                   <(FAX Text File),#HELPMT3>                                                      Fax mnemonics                   0031                                   <(FAX To),#HELPMT3>                                                             Fax mnemonics                   0032                                   <(FAX Write Config),#HELPMT3>                                                   HOME                            0001                              Table of Contents                                                                    HOME                            0002                              =================                                                                    HOME                            0003                                                                                                                   HOME                            0004                                <Introduction to MoreThanBasic,#HELPMT2>                                           HOME                            0005                                <Language Structure,#HELPMT2>                                                      HOME                            0006                                   <Data Division,#HELPMT3>                                                        HOME                            0007                                   <I/O Format Division,#HELPMT3>                                                  HOME                            0008                                   <Procedure Division,#HELPMT4>                                                   HOME                            0009                                <Overview of the Comet File System,#HELPMT2>                                       HOME                            0010                                <Using the MTB Compiler,#HELPMT2>                                                  HOME                            0011                                <MTB Applications,#HELPMT5>                                                        HOME                            0012                                <Instant Reference Guide,#HELPMT6>                                                 HOME                            0013                                <Index|INDEX,#HELPMTB>                                                             Help Messages and Linking Method0001                              Help Messages and Linking Methods                                                    Help Messages and Linking Method0002                              =================================                                                    Help Messages and Linking Method0003                                                                                                                   Help Messages and Linking Method0004                                The following data files are used by the Comet Help System:                        Help Messages and Linking Method0005                                                                                                                   Help Messages and Linking Method0006                                #HELP        Master library of help messages                                       Help Messages and Linking Method0007                                #HELPLNK     Link between object programs and help messages                        Help Messages and Linking Method0008                                #HELPTBL     Lookup table definitions                                              Help Messages and Linking Method0009                                #HELPXRF     Cross-reference of messages and object programs                       Help Messages and Linking Method0010                                             where they are used                                                   Help Messages and Linking Method0011                                #HELPXTR     Extracted help messages (default file name)                           Help Messages and Linking Method0012                                                                                                                   Help Messages and Linking Method0013                                To help you achieve greater consistency in your help messages and                  Help Messages and Linking Method0014                                avoid duplication of text, all help messages are stored in a                       Help Messages and Linking Method0015                                single master help file called #HELP. Object programs are linked                   Help Messages and Linking Method0016                                to these help messages through an intermediate link file called                    Help Messages and Linking Method0017                                #HELPLNK. Thus, a single help message in the #HELP file can be                     Help Messages and Linking Method0018                                used by many object programs; the only difference is that a                        Help Messages and Linking Method0019                                unique "link record" exists in the #HELPLNK for each separate use                  Help Messages and Linking Method0020                                of the master help message.                                                        Help Messages and Linking Method0021                                                                                                                   Help Messages and Linking Method0022                                A fourth data file, #HELPXRF, contains a cross-reference of help                   Help Messages and Linking Method0023                                messages and where they are used. This file is essential for                       Help Messages and Linking Method0024                                maintenance of your help system (especially if you need to delete                  Help Messages and Linking Method0025                                a message and all of its associated links).                                        Help Messages and Linking Method0026                                                                                                                   Help Messages and Linking Method0027                              Linking methods                                                                      Help Messages and Linking Method0028                              ===============                                                                      Help Messages and Linking Method0029                                                                                                                   Help Messages and Linking Method0030                                The help messages are linked to their corresponding object                         Help Messages and Linking Method0031                                programs by one of the following three methods:                                    Help Messages and Linking Method0032                                                                                                                   Help Messages and Linking Method0033                                1. object program name + cursor position (i.e., screen                             Help Messages and Linking Method0034                                   coordinates) + "@0000@"                                                         Help Messages and Linking Method0035                                                                                                                   Help Messages and Linking Method0036                                   This is the simplest way to link a help message to an object                    Help Messages and Linking Method0037                                   program. The Comet Help System combines the object program                      Help Messages and Linking Method0038                                   name and the current cursor position, and uses the resulting                    Help Messages and Linking Method0039                                   field as the key to store and retrieve the help message.                        Help Messages and Linking Method0040                                   However, if your program has multiple display formats that use                  Help Messages and Linking Method0041                                   the same screen location, the help system provides access to                    Help Messages and Linking Method0042                                   only one help message (see method 2 for an alternative).                        Help Messages and Linking Method0043                                                                                                                   Help Messages and Linking Method0044                                2. object program name + cursor position + program address                         Help Messages and Linking Method0045                                                                                                                   Help Messages and Linking Method0046                                   This method adds the program execution address to the object                    Help Messages and Linking Method0047                                   program name and cursor position. The resulting field is used                   Help Messages and Linking Method0048                                   as the key to store and retrieve the help message. This                         Help Messages and Linking Method0049                                   combination solves the multiple format problem from above.                      Help Messages and Linking Method0050                                   However, if you modify and recompile your program, the                          Help Messages and Linking Method0051                                   execution addresses will change, and your help links will no                    Help Messages and Linking Method0052                                   longer be valid.                                                                Help Messages and Linking Method0053                                                                                                                   Help Messages and Linking Method0054                                3. object program name + value of the HELPKEY$ system variable                     Help Messages and Linking Method0055                                                                                                                   Help Messages and Linking Method0056                                   The ultimate way to control the links between your program and                  Help Messages and Linking Method0057                                   the Comet Help System is to use the system variable called                      Help Messages and Linking Method0058                                   <HELPKEY$,#HELPMT3>.                                                            Help Messages and Linking Method0059                                                                                                                   Help Messages and Linking Method0060                                   HELPKEY$ is a 4-byte string whose value is set by your MTB                      Help Messages and Linking Method0061                                   program and subsequently used by the help system as the key to                  Help Messages and Linking Method0062                                   store and retrieve the help message.                                            Help Messages and Linking Method0063                                                                                                                   Help Messages and Linking Method0064                                   For example, if your program sets HELPKEY$ to a value of                        Help Messages and Linking Method0065                                   "ABCD", the help message will be keyed by the object program                    Help Messages and Linking Method0066                                   name plus "ABCD" (see example below).                                           Help Messages and Linking Method0067                                                                                                                   Help Messages and Linking Method0068                                   You may change the value of HELPKEY$ throughout a single MTB                    Help Messages and Linking Method0069                                   program; each new value will effect a new help message link.                    Help Messages and Linking Method0070                                   This is the way to link numerous help messages to a single                      Help Messages and Linking Method0071                                   object program without using the screen position/program                        Help Messages and Linking Method0072                                   address method.                                                                 Help Messages and Linking Method0073                                                                                                                   Help Messages and Linking Method0074                                   If the HELPKEY$ variable is not set by your MTB program, the                    Help Messages and Linking Method0075                                   system assigns it a null value, and the Comet Help System (if                   Help Messages and Linking Method0076                                   invoked) will link help messages using one of the first two                     Help Messages and Linking Method0077                                   methods from above.                                                             Help Messages and Linking Method0078                                                                                                                   Help Messages and Linking Method0079                                   Thus, with HELPKEY$, your access to help messages does not                      Help Messages and Linking Method0080                                   depend on the screen position or the program execution                          Help Messages and Linking Method0081                                   address.                                                                        Help Messages and Linking Method0082                                                                                                                   Help Messages and Linking Method0083                              Example:                                                                             Help Messages and Linking Method0084                                                                                                                   Help Messages and Linking Method0085                                This sample MTB program segment shows how the value of HELPKEY$                    Help Messages and Linking Method0086                                can be changed throughout a single program. This object program                    Help Messages and Linking Method0087                                is named TEST.                                                                     Help Messages and Linking Method0088                                                                                                                   Help Messages and Linking Method0089                                !S XTEST,DSK                                                                       Help Messages and Linking Method0090                                !O TEST,DSK                                                                        Help Messages and Linking Method0091                                !L T00,E                                                                           Help Messages and Linking Method0092                                !R CED                                                                             Help Messages and Linking Method0093                                .                                                                                  Help Messages and Linking Method0094                                .                                                                                  Help Messages and Linking Method0095                                HELPKEY$="ABCD"        ! At this point, the help message                           Help Messages and Linking Method0096                                INPUT (0) VAR1$        ! will be keyed by                                          Help Messages and Linking Method0097                                .                      ! "TEST.MTB" + "ABCD"                                       Help Messages and Linking Method0098                                .                                                                                  Help Messages and Linking Method0099                                .                                                                                  Help Messages and Linking Method0100                                HELPKEY$="1234"        ! At this point, the help message                           Help Messages and Linking Method0101                                INPUT (0) VAR2$        ! will be keyed by                                          Help Messages and Linking Method0102                                .                      ! "TEST.MTB" + "1234"                                       Help Messages and Linking Method0103                                .                                                                                  Help Messages and Linking Method0104                                .                                                                                  Help Messages and Linking Method0105                                HELPKEY$="ZZZZ"        ! At this point, the help message                           Help Messages and Linking Method0106                                INPUT (0) VAR3$        ! will be keyed by                                          Help Messages and Linking Method0107                                .                      ! "TEST.MTB" + "ZZZZ"                                       Help Messages and Linking Method0108                                .                                                                                  Help Messages and Linking Method0109                                .                                                                                  MTB Applications                0001                              MTB Applications                                                                     MTB Applications                0002                              ================                                                                     MTB Applications                0003                                                                                                                   MTB Applications                0004                                <BTRIEVE gateway>                                                                  MTB Applications                0005                                <Comet Electronic Mail>                                                            MTB Applications                0006                                <Comet windows>                                                                    MTB Applications                0007                                <DOS Function Calls> and <Pseudo DOS Functions>                                    MTB Applications                0008                                <Dynamic Driver Libraries>                                                         MTB Applications                0009                                <Fax driver>                                                                       MTB Applications                0010                                <Mouse driver>                                                                     MTB Applications                0011                                <NOVA>                                                                             MTB Applications                0012                                <QTerm gateway>                                                                    MTB Applications                0013                                <Scan Codes>                                                                       MTB Applications                0014                                <Sort gateway>                                                                     Mouse demo program              0001                              Mouse demo program                                                                   Mouse demo program              0002                              ==================                                                                   Mouse demo program              0003                                                                                                                   Mouse demo program              0004                                This program draws a box on the screen, then waits for a mouse                     Mouse demo program              0005                                click to occur within the bounds of the box. The coordinates of                    Mouse demo program              0006                                all mouse clicks are displayed on the message line via the (WC)                    Mouse demo program              0007                                mnemonic.                                                                          Mouse demo program              0008                                                                                                                   Mouse demo program              0009                                !----------------------  DATA DIVISION  -------------------------                  Mouse demo program              0010                                LENGTH 2 & LOCAL CLICK$                     ! Input variable                       Mouse demo program              0011                                LENGTH 2 & LOCAL MOUSECURSOR$               ! Mouse location                       Mouse demo program              0012                                LENGTH 1 & LOCAL MOUSECLICK$,MOUSESTATE$    ! Other mouse fields                   Mouse demo program              0013                                LENGTH 3.0 & LOCAL ROW, COLUMN              ! Mouse location                       Mouse demo program              0014                                                                                                                   Mouse demo program              0015                                !----------------------  FORMAT DIVISION  -----------------------                  Mouse demo program              0016                                                                                                                   Mouse demo program              0017                                MOUSE.INFO: FORMAT MOUSECURSOR$;MOUSECLICK$;MOUSESTATE$                            Mouse demo program              0018                                !                                                                                  Mouse demo program              0019                                ! Mouse info contains 4 binary bytes:                                              Mouse demo program              0020                                ! Byte 1 = Horizontal mouse coordinate                                             Mouse demo program              0021                                ! Byte 2 = Vertical mouse coordinate                                               Mouse demo program              0022                                ! Byte 3 = Last mouse button state where any buttons were down                     Mouse demo program              0023                                ! Byte 4 = Current state of mouse buttons where:                                   Mouse demo program              0024                                !          @01@ = Left button down                                                 Mouse demo program              0025                                !          @02@ = Right button down                                                Mouse demo program              0026                                !          @04@ = Center button down                                               Mouse demo program              0027                                                                                                                   Mouse demo program              0028                                !======================  PROCEDURE DIVISION =====================                  Mouse demo program              0029                                                                                                                   Mouse demo program              0030                                PRINT (0) (CS)                           ! Clear the screen                        Mouse demo program              0031                                PRINT (0) (Change colors="@07@","@70@","@00@","@00@","@00@")                       Mouse demo program              0032                                PRINT (0) (Draw box=10,5,20,10)          ! Draw box                                Mouse demo program              0033                                PRINT (0) (Hide cursor)                  ! Make cursor invisible                   Mouse demo program              0034                                PRINT (0) (Enhanced mouse on)            ! Open mouse driver                       Mouse demo program              0035                                PRINT (0) (Show mouse cursor)            ! Show mouse cursor                       Mouse demo program              0036                                                                                                                   Mouse demo program              0037                                !----------------------------------------------------------------                  Mouse demo program              0038                                                                                                                   Mouse demo program              0039                                TOP:  INPUT (0) CLICK$                   ! Wait for mouse click                    Mouse demo program              0040                                      IF CLICK$ = "@00FE@" OR _          ! Mouse button down?                      Mouse demo program              0041                                           CLICK$ = "@00FF@" THEN _     ! Mouse button up?                         Mouse demo program              0042                                      GOTO CLICK                         ! Branch out of loop                      Mouse demo program              0043                                                                                                                   Mouse demo program              0044                                      GOTO TOP                           ! Loop back                               Mouse demo program              0045                                !----------------------------------------------------------------                  Mouse demo program              0046                                                                                                                   Mouse demo program              0047                                CLICK: READ (0,MOUSE.INFO)               ! Read mouse data                         Mouse demo program              0048                                                                                                                   Mouse demo program              0049                                       ROW=ASC(MOUSECURSOR$)-1           ! Determine row                           Mouse demo program              0050                                       COLUMN=ASC(SUB(MOUSECURSOR$,2,1)) ! Determine column                        Mouse demo program              0051                                                                                                                   Mouse demo program              0052                                       PRINT (0) (WC);"COLUMN=";COLUMN;"ROW=";ROW                                  Mouse demo program              0053                                                                                                                   Mouse demo program              0054                                       IF COLUMN GE 10 AND COLUMN LE 20  ! Click within the box?                   Mouse demo program              0055                                          IF ROW GE 5  AND ROW LE 10                                               Mouse demo program              0056                                             GOTO QUIT                   ! If so, branch out                       Mouse demo program              0057                                          ENDIF                                                                    Mouse demo program              0058                                       ENDIF                                                                       Mouse demo program              0059                                                                                                                   Mouse demo program              0060                                       GOTO TOP                          ! Otherwise, loop back                    Mouse demo program              0061                                                                                                                   Mouse demo program              0062                                 !---------------------------------------------------------------                  Mouse demo program              0063                                                                                                                   Mouse demo program              0064                                QUIT: PRINT (0) (Mouse off)              ! Close mouse driver                      Mouse demo program              0065                                      PRINT (0) (Show cursor)            ! Make cursor visible                     Mouse demo program              0066                                      PRINT (0) (WC);"@00@"              ! Clear the message line                  Mouse demo program              0067                                                                                                                   Mouse demo program              0068                                RUN "QMONITOR"                                                                     Mouse demo program              0069                                END                                                                                Mouse driver                    0001                              Mouse driver                                                                         Mouse driver                    0002                              ============                                                                         Mouse driver                    0003                                                                                                                   Mouse driver                    0004                                Comet provides support for the standard mouse driver (MOUSE.SYS                    Mouse driver                    0005                                or MOUSE.COM) on the Comet console. This feature is intended for                   Mouse driver                    0006                                Comet consoles running in DOS or full-screen Microsoft Windows.                    Mouse driver                    0007                                This feature is currently NOT intended for consoles running under                  Mouse driver                    0008                                MS Windows with partial screen windows.                                            Mouse driver                    0009                                                                                                                   Mouse driver                    0010                                The following sections explain the basic mouse operations:                         Mouse driver                    0011                                                                                                                   Mouse driver                    0012                                <Open the mouse>                                                                   Mouse driver                    0013                                <Show/hide the mouse cursor>                                                       Mouse driver                    0014                                <Regular cursor display>                                                           Mouse driver                    0015                                <Detecting mouse clicks>                                                           Mouse driver                    0016                                <Reading the mouse>                                                                Mouse driver                    0017                                <Polling the mouse>                                                                Mouse driver                    0018                                <Close the mouse>                                                                  Mouse driver                    0019                                                                                                                   Mouse driver                    0020                                For an integrated example, see the <Mouse demo program>.                           Mouse driver                    0021                                                                                                                   Mouse driver                    0022                                Here is a list of the MTB mouse mnemonics:                                         Mouse driver                    0023                                                                                                                   Mouse driver                    0024                                <(Mouse On),#HELPMT3>                                                              Mouse driver                    0025                                <(BIOS Mouse On),#HELPMT3>                                                         Mouse driver                    0026                                <(Enhanced Mouse On),#HELPMT3>                                                     Mouse driver                    0027                                                                                                                   Mouse driver                    0028                                <(Mouse Off),#HELPMT3>                                                             Mouse driver                    0029                                                                                                                   Mouse driver                    0030                                <(Show Mouse Cursor),#HELPMT3>                                                     Mouse driver                    0031                                <(Hide Mouse Cursor),#HELPMT3>                                                     Mouse driver                    0032                                                                                                                   Mouse driver                    0033                                <(Read Mouse),#HELPMT3>                                                            Mouse driver                    0034                                                                                                                   Mouse driver                    0035                                Also see <Enhanced Character Set> and the following mnemonics:                     Mouse driver                    0036                                                                                                                   Mouse driver                    0037                                <(Enhanced Characters On),#HELPMT3>                                                Mouse driver                    0038                                <(Enhanced Characters Off),#HELPMT3>                                               Mouse sample programs           0001                              Mouse sample programs                                                                Mouse sample programs           0002                              =====================                                                                Mouse sample programs           0003                                                                                                                   Mouse sample programs           0004                                Signature Systems has developed several sample programs to                         Mouse sample programs           0005                                demonstrate how the mouse interface can be implemented. These                      Mouse sample programs           0006                                programs include:                                                                  Mouse sample programs           0007                                                                                                                   Mouse sample programs           0008                                MDEMO   a simple demo program with radio buttons, check boxes,                     Mouse sample programs           0009                                        close window icon, "hot zones," continual mouse checking,                  Mouse sample programs           0010                                        etc.                                                                       Mouse sample programs           0011                                                                                                                   Mouse sample programs           0012                                QMOUSE  a more extensive demo program with several overlays,                       Mouse sample programs           0013                                        extensive use of "hot zones," Comet windows, "wallpaper,"                  Mouse sample programs           0014                                        radio buttons, check boxes, etc.                                           Mouse sample programs           0015                                                                                                                   Mouse sample programs           0016                                LOOKDIR a sample utility program/lookup program. Displays your                     Mouse sample programs           0017                                        current directory names and uses the mouse to scroll                       Mouse sample programs           0018                                        forward/reverse and to close the window. Can be run from                   Mouse sample programs           0019                                        QMONITOR or linked to any field in any program as a                        Mouse sample programs           0020                                        lookup program (accessible via the NOVA keys).                             NOVA                            0001  The NOVA System             The NOVA System                                                                      NOVA                            0002  The NOVA System             ===============                                                                      NOVA                            0003  The NOVA System                                                                                                  NOVA                            0004  The NOVA System               The NOVA System provides an easy way to add context-sensitive                      NOVA                            0005  The NOVA System               help features to MTB applications. For operational details,                        NOVA                            0006  The NOVA System               please see the Comet Utility Programs manual.                                      NOVA                            0007  The NOVA System                                                                                                  NOVA                            0008  The NOVA System               For MTB programming information, please see:                                       NOVA                            0009  The NOVA System               <Using the Automatic Help Feature>                                                 NOVA                            0010  The NOVA System               <Working with the #NOVA Control File>                                              NOVA                            0011  The NOVA System               <Creating Custom Lookup Programs>                                                  NOVA                            0012  The NOVA System               <Help Messages and Linking Methods>                                                Open the mouse                  0001                              Open the mouse                                                                       Open the mouse                  0002                              ==============                                                                       Open the mouse                  0003                                                                                                                   Open the mouse                  0004                                The Comet mouse interface is available to any MTB program by                       Open the mouse                  0005                                adding several instructions. The first instruction opens the                       Open the mouse                  0006                                mouse driver.                                                                      Open the mouse                  0007                                                                                                                   Open the mouse                  0008                                1. To open the default mouse driver (BIOS mouse or enhanced                        Open the mouse                  0009                                   mouse), use the following instruction:                                          Open the mouse                  0010                                                                                                                   Open the mouse                  0011                                        PRINT (0) <(Mouse On),#HELPMT3>                                            Open the mouse                  0012                                                                                                                   Open the mouse                  0013                                2. To open the BIOS mouse driver, use the following instruction:                   Open the mouse                  0014                                                                                                                   Open the mouse                  0015                                        PRINT (0) <(BIOS Mouse On),#HELPMT3>                                       Open the mouse                  0016                                                                                                                   Open the mouse                  0017                                   The BIOS mouse displays a small rectangular cursor.                             Open the mouse                  0018                                                                                                                   Open the mouse                  0019                                3. To open the enhanced mouse driver, use the following                            Open the mouse                  0020                                   instruction:                                                                    Open the mouse                  0021                                                                                                                   Open the mouse                  0022                                        PRINT (0) <(Enhanced Mouse On),#HELPMT3>                                   Open the mouse                  0023                                                                                                                   Open the mouse                  0024                                   The enhanced mouse displays a graphical cursor in the shape of                  Open the mouse                  0025                                   an arrow.                                                                       Open the mouse                  0026                                                                                                                   Open the mouse                  0027                                See the <sample mouse open> program.                                               Open the mouse                  0028                                                                                                                   Open the mouse                  0029                                Also see <Show/hide the mouse cursor>.                                             Polling the mouse               0001                              Polling the mouse                                                                    Polling the mouse               0002                              =================                                                                    Polling the mouse               0003                                                                                                                   Polling the mouse               0004                                Your MTB program can poll the mouse without requiring the                          Polling the mouse               0005                                operator to click a mouse button. This allows for continuous                       Polling the mouse               0006                                mouse monitoring and gives you the ability to create "hot zones"                   Polling the mouse               0007                                on the screen (i.e., screen locations that respond to mouse                        Polling the mouse               0008                                movements without mouse clicks).                                                   Polling the mouse               0009                                                                                                                   Polling the mouse               0010                                The <(Read Mouse),#HELPMT3> mnemonic polls the mouse and places 4                  Polling the mouse               0011                                bytes (binary encoded) into the input buffer.                                      Polling the mouse               0012                                                                                                                   Polling the mouse               0013                                   Note: This action occurs automatically when the mouse is                        Polling the mouse               0014                                   clicked. However, the (Read Mouse) mnemonic does not require a                  Polling the mouse               0015                                   mouse click.                                                                    Polling the mouse               0016                                                                                                                   Polling the mouse               0017                                The 4 bytes are:                                                                   Polling the mouse               0018                                                                                                                   Polling the mouse               0019                                Byte    Description                                                                Polling the mouse               0020                                ================================================================                   Polling the mouse               0021                                1-2     Screen coordinates where mouse was clicked                                 Polling the mouse               0022                                3       which button was pressed                                                   Polling the mouse               0023                                4       the current state of the mouse buttons                                     Polling the mouse               0024                                                                                                                   Polling the mouse               0025                                See <Reading the mouse pseudocode> for a complete description.                     Polling the mouse               0026                                                                                                                   Polling the mouse               0027                                Also see the <Mouse demo program>.                                                 Pseudo DOS Functions            0001                              Pseudo DOS Functions                                                                 Pseudo DOS Functions            0002                              ====================                                                                 Pseudo DOS Functions            0003                                                                                                                   Pseudo DOS Functions            0004                                MTB provides several pseudo DOS functions, all of which are                        Pseudo DOS Functions            0005                                implemented with the <DOSRW> statement. These pseudo functions                     Pseudo DOS Functions            0006                                include:                                                                           Pseudo DOS Functions            0007                                                                                                                   Pseudo DOS Functions            0008                                <Copy file|DOS:COPY>                                                               Pseudo DOS Functions            0009                                <Find a string|DOS:FIND>                                                           Pseudo DOS Functions            0010                                <Find a string -- reverse|DOS:FINDREVERSE>                                         Pseudo DOS Functions            0011                                <Move a file|DOS:MOVE>                                                             Pseudo DOS Functions            0012                                <Send a Message to All Terminals|DOS:MESSAGEALL>                                   Pseudo DOS Functions            0013                                <Send a Message to Another Terminal|DOS:MESSAGE>                                   Pseudo DOS Functions            0014                                                                                                                   Pseudo DOS Functions            0015                                Also see <DOS Function Calls>.                                                     Pseudocode for in-memory sort   0001                              Pseudocode for in-memory sort                                                        Pseudocode for in-memory sort   0002                              =============================                                                        Pseudocode for in-memory sort   0003                                                                                                                   Pseudocode for in-memory sort   0004                                Here are the steps to follow to perform an in-memory sort of up                    Pseudocode for in-memory sort   0005                                to 64K bytes of data.                                                              Pseudocode for in-memory sort   0006                                                                                                                   Pseudocode for in-memory sort   0007                                1. Use the DSTAT function on configured gateway devices (G00,                      Pseudocode for in-memory sort   0008                                   G01, etc.) to determine an available sort gateway. The DSTAT                    Pseudocode for in-memory sort   0009                                   function returns information about each Comet device,                           Pseudocode for in-memory sort   0010                                   including gateways. For an available sort gateway, DSTAT                        Pseudocode for in-memory sort   0011                                   returns the first 3 bytes as blank spaces (indicating that                      Pseudocode for in-memory sort   0012                                   there is no current owner of the gateway), followed by a "2"                    Pseudocode for in-memory sort   0013                                   (indicating that the device is a type-2 gateway).                               Pseudocode for in-memory sort   0014                                                                                                                   Pseudocode for in-memory sort   0015                                2. Open the gateway device and assign it to a specific logical                     Pseudocode for in-memory sort   0016                                   unit number in your program. If your program receives an                        Pseudocode for in-memory sort   0017                                   exception 31, another user has opened the gateway you were                      Pseudocode for in-memory sort   0018                                   trying to open. Return to step 1 and determine another                          Pseudocode for in-memory sort   0019                                   available gateway.                                                              Pseudocode for in-memory sort   0020                                                                                                                   Pseudocode for in-memory sort   0021                                3. Send the following control code to the gateway lun:                             Pseudocode for in-memory sort   0022                                                                                                                   Pseudocode for in-memory sort   0023                                        FILE (lun) CTL="@02xxxx@"                                                  Pseudocode for in-memory sort   0024                                                                                                                   Pseudocode for in-memory sort   0025                                   This control sets the record length for the sort records,                       Pseudocode for in-memory sort   0026                                   where xxxx is the number of bytes in hex. The maximum value is                  Pseudocode for in-memory sort   0027                                   0400 hex (1,024 decimal).                                                       Pseudocode for in-memory sort   0028                                                                                                                   Pseudocode for in-memory sort   0029                                4. Write records to the gateway lun. If the sort area becomes                      Pseudocode for in-memory sort   0030                                   full (exceeds 64K bytes), your program will receive an                          Pseudocode for in-memory sort   0031                                   exception 2.                                                                    Pseudocode for in-memory sort   0032                                                                                                                   Pseudocode for in-memory sort   0033                                5. After all records have been written to the gateway, send one                    Pseudocode for in-memory sort   0034                                   of the following controls to the gateway:                                       Pseudocode for in-memory sort   0035                                                                                                                   Pseudocode for in-memory sort   0036                                        FILE (lun) CTL="@00@"    to begin an ascending sort, or                    Pseudocode for in-memory sort   0037                                                                                                                   Pseudocode for in-memory sort   0038                                        FILE (lun) CTL="@01@"    to begin a descending sort                        Pseudocode for in-memory sort   0039                                                                                                                   Pseudocode for in-memory sort   0040                                   Control will not be returned to your program until the sort is                  Pseudocode for in-memory sort   0041                                   complete.                                                                       Pseudocode for in-memory sort   0042                                                                                                                   Pseudocode for in-memory sort   0043                                6. After the records have been sorted, you program may read them                   Pseudocode for in-memory sort   0044                                   from the gateway in the same fashion it would read records                      Pseudocode for in-memory sort   0045                                   from a sequential file (i.e., sequential reads, one read per                    Pseudocode for in-memory sort   0046                                   record, until an exception 2 is encountered).                                   Pseudocode for in-memory sort   0047                                                                                                                   Pseudocode for in-memory sort   0048                                7. Optionally, your program may re-read the records from the                       Pseudocode for in-memory sort   0049                                   gateway, or sort them in a different order (descending, for                     Pseudocode for in-memory sort   0050                                   example). To reset the read pointer to the first record in the                  Pseudocode for in-memory sort   0051                                   sort area, use the following control:                                           Pseudocode for in-memory sort   0052                                                                                                                   Pseudocode for in-memory sort   0053                                        FILE (lun) CTL="@03@"                                                      Pseudocode for in-memory sort   0054                                                                                                                   Pseudocode for in-memory sort   0055                                   Subsequent reads from the sort area will proceed from the                       Pseudocode for in-memory sort   0056                                   first record.                                                                   Pseudocode for sort/merge       0001                              Pseudocode for sort/merge                                                            Pseudocode for sort/merge       0002                              =========================                                                            Pseudocode for sort/merge       0003                                                                                                                   Pseudocode for sort/merge       0004                                Here are the steps to follow to perform a sort/merge of more than                  Pseudocode for sort/merge       0005                                64K bytes of data.                                                                 Pseudocode for sort/merge       0006                                                                                                                   Pseudocode for sort/merge       0007                                1. Use the DSTAT function on configured gateway devices (G00,                      Pseudocode for sort/merge       0008                                   G01, etc.) to determine an available sort gateway. The DSTAT                    Pseudocode for sort/merge       0009                                   function returns information about each Comet device,                           Pseudocode for sort/merge       0010                                   including gateways. For an available sort gateway, DSTAT                        Pseudocode for sort/merge       0011                                   returns the first 3 bytes as blank spaces (indicating that                      Pseudocode for sort/merge       0012                                   there is no current owner of the gateway), followed by a "2"                    Pseudocode for sort/merge       0013                                   (indicating that the device is a type-2 gateway).                               Pseudocode for sort/merge       0014                                                                                                                   Pseudocode for sort/merge       0015                                2. Open the gateway device and assign it to a specific logical                     Pseudocode for sort/merge       0016                                   unit number in your program. If your program receives an                        Pseudocode for sort/merge       0017                                   exception 31, another user has opened the gateway you were                      Pseudocode for sort/merge       0018                                   trying to open. Return to step 1 and determine another                          Pseudocode for sort/merge       0019                                   available gateway.                                                              Pseudocode for sort/merge       0020                                                                                                                   Pseudocode for sort/merge       0021                                3. Send the following control code to the gateway lun:                             Pseudocode for sort/merge       0022                                                                                                                   Pseudocode for sort/merge       0023                                        FILE (lun) CTL="@02xxxx@"                                                  Pseudocode for sort/merge       0024                                                                                                                   Pseudocode for sort/merge       0025                                   This control sets the record length for the sort records,                       Pseudocode for sort/merge       0026                                   where xxxx is the number of bytes in hex. The maximum value is                  Pseudocode for sort/merge       0027                                   0400 hex (1,024 decimal).                                                       Pseudocode for sort/merge       0028                                                                                                                   Pseudocode for sort/merge       0029                                4. Create two Comet sequential work files with the same record                     Pseudocode for sort/merge       0030                                   size as the records to be sorted.                                               Pseudocode for sort/merge       0031                                                                                                                   Pseudocode for sort/merge       0032                                5. Open the sequential work files.                                                 Pseudocode for sort/merge       0033                                                                                                                   Pseudocode for sort/merge       0034                                6. Send one of the following controls to the gateway lun:                          Pseudocode for sort/merge       0035                                                                                                                   Pseudocode for sort/merge       0036                                        FILE (lun) CTL="@04xxyy@"     to specify ascending                         Pseudocode for sort/merge       0037                                                                      sort/merge, or                               Pseudocode for sort/merge       0038                                                                                                                   Pseudocode for sort/merge       0039                                        FILE (lun) CTL="@05xxyy@"     to specify descending                        Pseudocode for sort/merge       0040                                                                      sort/merge                                   Pseudocode for sort/merge       0041                                                                                                                   Pseudocode for sort/merge       0042                                   where xx and yy are the logical unit numbers in hex of two                      Pseudocode for sort/merge       0043                                   open Comet sequential work files.                                               Pseudocode for sort/merge       0044                                                                                                                   Pseudocode for sort/merge       0045                                7. Write records to the gateway lun. The records will "pass                        Pseudocode for sort/merge       0046                                   through" the sort area and be written to the disk. If the disk                  Pseudocode for sort/merge       0047                                   becomes full, your program will receive an exception.                           Pseudocode for sort/merge       0048                                                                                                                   Pseudocode for sort/merge       0049                                8. After all records have been written, send the following                         Pseudocode for sort/merge       0050                                   control code to the gateway to begin the sort/merge operation:                  Pseudocode for sort/merge       0051                                                                                                                   Pseudocode for sort/merge       0052                                        FILE (lun) CTL="@06@"                                                      Pseudocode for sort/merge       0053                                                                                                                   Pseudocode for sort/merge       0054                                   Control will not be returned to your program until the sort is                  Pseudocode for sort/merge       0055                                   complete.                                                                       Pseudocode for sort/merge       0056                                                                                                                   Pseudocode for sort/merge       0057                                9. After the records have been sorted, you program may read them                   Pseudocode for sort/merge       0058                                   from the gateway in the same fashion it would read records                      Pseudocode for sort/merge       0059                                   from a sequential file (i.e., sequential reads, one read per                    Pseudocode for sort/merge       0060                                   record, until an exception 2 is encountered).                                   Pseudocode for sort/merge       0061                                                                                                                   Pseudocode for sort/merge       0062                                10.     Optionally, your program may re-read the records from the                  Pseudocode for sort/merge       0063                                        gateway. To reset the read pointer to the first record in                  Pseudocode for sort/merge       0064                                        the sort area, use the following control:                                  Pseudocode for sort/merge       0065                                                                                                                   Pseudocode for sort/merge       0066                                        FILE (lun) CTL="@03@"                                                      Pseudocode for sort/merge       0067                                                                                                                   Pseudocode for sort/merge       0068                                   Subsequent reads from the sort area will proceed from the                       Pseudocode for sort/merge       0069                                   first record.                                                                   Pseudocode for sort/merge       0070                                                                                                                   Pseudocode for sort/merge       0071                                11.     When the sort operation is complete, one of the work                       Pseudocode for sort/merge       0072                                        files will contain the sorted records and the other will                   Pseudocode for sort/merge       0073                                        be empty (the result of successive merges between the two                  Pseudocode for sort/merge       0074                                        files). Your program is responsible for erasing or                         Pseudocode for sort/merge       0075                                        renaming these work files as appropriate.                                  QTerm gateway                   0001                              QTerm gateway                                                                        QTerm gateway                   0002                              =============                                                                        QTerm gateway                   0003                                                                                                                   QTerm gateway                   0004                                Comet includes the ability to communicate with specialized                         QTerm gateway                   0005                                external software routines. These interfaces are accomplished via                  QTerm gateway                   0006                                Comet gateways. The QTerm gateway is a session of QTerm, running                   QTerm gateway                   0007                                on a Comet host processor, that provides access to a remote                        QTerm gateway                   0008                                system to which the QTerm is connected.                                            QTerm gateway                   0009                                                                                                                   QTerm gateway                   0010                                One way to visualize a QTerm gateway is as a "tunnel." The tunnel                  QTerm gateway                   0011                                runs from the Comet system, to QTerm (running memory resident in                   QTerm gateway                   0012                                the same machine as Comet), and then to the remote processor                       QTerm gateway                   0013                                where QTerm is connected. On that remote processor, the 8                          QTerm gateway                   0014                                sessions of QTerm are configured with terminal names and                           QTerm gateway                   0015                                partitions name. Read and write requests to the gateway from the                   QTerm gateway                   0016                                Comet system are directed by QTerm, through the appropriate                        QTerm gateway                   0017                                session, to the remote processor. The remote processor then does                   QTerm gateway                   0018                                some activity to that terminal name, which goes back through the                   QTerm gateway                   0019                                tunnel, to the initiating terminal, the one that opened the                        QTerm gateway                   0020                                gateway.                                                                           QTerm gateway                   0021                                                                                                                   QTerm gateway                   0022                                ___________________                     ______________________                     QTerm gateway                   0023                                |  Comet machine  |                     |  Remote processor  |                     QTerm gateway                   0024                                |                 |                     |                    |                     QTerm gateway                   0025                                |                 |                     |                    |                     QTerm gateway                   0026                                | configured      |                     |  configured        |                     QTerm gateway                   0027                                | gateways and    |                     |  partitions:       |                     QTerm gateway                   0028                                | sessions:       |                     |                    |                     QTerm gateway                   0029                                |                 |                     |                    |                     QTerm gateway                   0030                                | T14 ----- G00   |              /------|  partition P14     |                     QTerm gateway                   0031                                | T15 ----- G01   |-------------|-------|  partition P15     |                     QTerm gateway                   0032                                | T16 ----- G02   |              \------|  partition P16     |                     QTerm gateway                   0033                                |                 |                     |                    |                     QTerm gateway                   0034                                -------------------                     ----------------------                     QTerm gateway                   0035                                                                                                                   QTerm gateway                   0036                                The diagram above show the stricture of a system set of for 3                      QTerm gateway                   0037                                QTerm gateways. The Comet machine has QTerm loaded and connected                   QTerm gateway                   0038                                to the Remote machine. The QTerm in the Comet machine is                           QTerm gateway                   0039                                configured as T14/P14, T14/P15, and T16/P16 on the Remote                          QTerm gateway                   0040                                machine. In Comet, gateway G00 is configured to correspond to the                  QTerm gateway                   0041                                session number associated with T14; G01 corresponds to the                         QTerm gateway                   0042                                session number of T15; and G02 corresponds to the session number                   QTerm gateway                   0043                                of T16. Any user running under Comet on the Comet machine can                      QTerm gateway                   0044                                open a gateway, and directly communicate wit the Remote machine.                   QTerm gateway                   0045                                The Remote machine can also communicate with the Comet machine by                  QTerm gateway                   0046                                writing to one of the QTerm terminal names. The Remote machine                     QTerm gateway                   0047                                can be either a Comet system of a Qantel system.                                   QTerm gateway                   0048                                                                                                                   QTerm gateway                   0049                              Example:                                                                             QTerm gateway                   0050                                                                                                                   QTerm gateway                   0051                                As an application example, the following simple program provides                   QTerm gateway                   0052                                the functionality of a *REMOTE program. In this example, the                       QTerm gateway                   0053                                QTerm gateway allows a single-user Comet system, or any terminal                   QTerm gateway                   0054                                on a multi-user Comet system to actually run programs on the                       QTerm gateway                   0055                                Remote system. Essentially, whatever is typed on the Comet                         QTerm gateway                   0056                                terminal is transmitted through the gateway to the Remote                          QTerm gateway                   0057                                processor. When this program us run n a terminal on the Comet                      QTerm gateway                   0058                                system, whatever is typed on the terminal is written to the                        QTerm gateway                   0059                                chosen gateway. If the user types RUN *EDIT, the *EDIT program                     QTerm gateway                   0060                                would urn on the Remote processor in the partition associated                      QTerm gateway                   0061                                with gateway G01. The prompt that is displayed when the program                    QTerm gateway                   0062                                is run will be written to the Comet terminal. Effectively, the                     QTerm gateway                   0063                                Comet terminal is now "locally" attached to the remote processor.                  QTerm gateway                   0064                                                                                                                   QTerm gateway                   0065                                LENGTH 2 & LOCAL M$                                                                QTerm gateway                   0066                                LENGTH 200 & LOCAL A$, B$, C$, D$                                                  QTerm gateway                   0067                                1000    FORMAT M$;A$;B$;C$;D$                                                      QTerm gateway                   0068                                2000    FORMAT (ET);A$;B$;C$;D$                                                    QTerm gateway                   0069                                3000    FORMAT (EN);A$;B$;C$;D$                                                    QTerm gateway                   0070                                CLEAR                                                                              QTerm gateway                   0071                                100     A$="WHICH SESSION (0-8)?" & PRINT (0,2000)                                 QTerm gateway                   0072                                        INPUT (0) A$                                                               QTerm gateway                   0073                                        A$=SUB(A$,1,1)                                                             QTerm gateway                   0074                                        IF A$ LT "0" OR A$ GT "8" THEN GOTO 100                                    QTerm gateway                   0075                                        A$ = "G0"+A$                                                               QTerm gateway                   0076                                        OPEN (1) A$, EXCP=100                                                      QTerm gateway                   0077                                1000                                                                               QTerm gateway                   0078                                        ESCAPE TO 2000                                                             QTerm gateway                   0079                                        A$=STS(0)                                                                  QTerm gateway                   0080                                        IF SUB(A$,3,1)="1" THEN READ (0,1000) & PRINT (1,1000)                     QTerm gateway                   0081                                        IF SUB(STS(1),9,1) NE "1" THEN GOTO 1000                                   QTerm gateway                   0082                                        READ (1,1000                                                               QTerm gateway                   0083                                        IF M$="@0E04@" FILE (1) CTL="@06" &_    ! turn off F2                      QTerm gateway                   0084                                                       FILE (1) CTL="@05@       ! and F3                           QTerm gateway                   0085                                        IF M$="@0E0F@"                          ! logoff program                   QTerm gateway                   0086                                             IF A$="" THEN RUN "QMONITOR"       ! sends this to                    QTerm gateway                   0087                                             GOTO 1000                          ! exit                             QTerm gateway                   0088                                        ENDIF                                                                      QTerm gateway                   0089                                        IF M$="@0E05@"                          ! if (ET)                          QTerm gateway                   0090                                             PRINT (0,2000)                     ! tell Comet, so                   QTerm gateway                   0091                                                                                ! subsequent                       QTerm gateway                   0092                                                                                ! prints stay in                   QTerm gateway                   0093                                                                                ! (ET)                             QTerm gateway                   0094                                        ELSE                                                                       QTerm gateway                   0095                                             IF M$="@0E06@"                     ! check for (EN)                   QTerm gateway                   0096                                                  IF A$="@0E0F@" RUN "QMONITOR                                     QTerm gateway                   0097                                                  PRINT (0,3000)                                                   QTerm gateway                   0098                                             ENDIF                                                                 QTerm gateway                   0099                                        ENDIF                                                                      QTerm gateway                   0100                                        GOTO 1000                                                                  QTerm gateway                   0101                                2000    FILE (1) CTL="@03@"                                                        QTerm gateway                   0102                                        PRINT (0) "@0E04@"                                                         QTerm gateway                   0103                                        GOTO 1000                                                                  QTerm gateway                   0104                                                                                                                   QTerm gateway                   0105                                In its simplest explanation, a program running on Comet system A                   QTerm gateway                   0106                                above can write to the QTerm gateway, and by writing to the                        QTerm gateway                   0107                                gateway it is just as if whatever is written was actually entered                  QTerm gateway                   0108                                at the QTerm gateway PC.                                                           QTerm gateway                   0109                                                                                                                   QTerm gateway                   0110                                Because QTerm provides up to 8 sessions, there are essentially 8                   QTerm gateway                   0111                                gateways available to any Comet system.                                            QTerm gateway                   0112                                                                                                                   QTerm gateway                   0113                                The QTerm gateway responds to several controls which allow for                     QTerm gateway                   0114                                full terminal interaction. The controls are:                                       QTerm gateway                   0115                                                                                                                   QTerm gateway                   0116                                Control      Description                                                           QTerm gateway                   0117                                =================================================================                  QTerm gateway                   0118                                "@01@"       Set F1                                                                QTerm gateway                   0119                                "@02@"       Set F2                                                                QTerm gateway                   0120                                "@03@"       Set F3                                                                QTerm gateway                   0121                                "@04@"       Modem command follows                                                 QTerm gateway                   0122                                "@05@"       Reset F3                                                              QTerm gateway                   0123                                "@06@"       Reset F2                                                              QTerm gateway                   0124                                "@07@"       Reset F1                                                              QTerm gateway                   0125                                                                                                                   QTerm gateway                   0126                                These controls are written to the QTerm gateway by using the FILE                  QTerm gateway                   0127                                command in MTB. You will note that at statement label 2000 in the                  QTerm gateway                   0128                                listing above, the program issues the following command to the                     QTerm gateway                   0129                                gateway:                                                                           QTerm gateway                   0130                                                                                                                   QTerm gateway                   0131                                   FILE (1) CTL="@03@"                                                             QTerm gateway                   0132                                                                                                                   QTerm gateway                   0133                                Since the program is coded for an ESCAPE TO 2000, whenever F3 is                   QTerm gateway                   0134                                pressed on the local terminal, an F3/Transmit is issued to the                     QTerm gateway                   0135                                gateway and to the remote processor.                                               QTerm gateway                   0136                                                                                                                   QTerm gateway                   0137                                The QTerm gateway also responds to the STS function with the                       QTerm gateway                   0138                                following returned values:                                                         QTerm gateway                   0139                                                                                                                   QTerm gateway                   0140                                Byte    Description/Value(s)                                                       QTerm gateway                   0141                                =================================================================                  QTerm gateway                   0142                                1       "@77@"                                                                     QTerm gateway                   0143                                2       "@99@"                                                                     QTerm gateway                   0144                                                                                                                   QTerm gateway                   0145                                3-10    Describe the status of the terminal, each byte being 1 or                  QTerm gateway                   0146                                        0 with the following meaning:                                              QTerm gateway                   0147                                                                                                                   QTerm gateway                   0148                                        Byte 3    inoperable if set to 1                                           QTerm gateway                   0149                                        Byte 4    F3 is on if set to 1                                             QTerm gateway                   0150                                        Byte 5    F2 is on if set to 1                                             QTerm gateway                   0151                                        Byte 6    Read request is pending is set to 1                              QTerm gateway                   0152                                        Byte 7    80-column mode if set to 1                                       QTerm gateway                   0153                                        Byte 8    not used                                                         QTerm gateway                   0154                                        Byte 9    Busy if set to 1                                                 QTerm gateway                   0155                                        Byte 10   F1 was pressed if set to 1                                       QTerm gateway                   0156                                                                                                                   QTerm gateway                   0157                                11-18   Describe the last poll type, each byte being 1 or 0 with                   QTerm gateway                   0158                                        the following meaning:                                                     QTerm gateway                   0159                                                                                                                   QTerm gateway                   0160                                                                                                                   QTerm gateway                   0161                                        Byte 11   Always 0                                                         QTerm gateway                   0162                                        Byte 12   Always 0                                                         QTerm gateway                   0163                                        Byte 13   Always 0                                                         QTerm gateway                   0164                                        Byte 14   Set to 1 if the last poll was a status poll,                     QTerm gateway                   0165                                                  set to 0 if the last poll was a data poll                        QTerm gateway                   0166                                        Byte 15   Always 0                                                         QTerm gateway                   0167                                        Byte 16   Always 1                                                         QTerm gateway                   0168                                        Byte 17   Set to 1 if the last poll was a status poll,                     QTerm gateway                   0169                                                  set to 0 if the last poll was a data poll                        QTerm gateway                   0170                                        Byte 18   Always 1                                                         QTerm gateway                   0171                                                                                                                   QTerm gateway                   0172                                Gateways may also be used to read and write files between                          QTerm gateway                   0173                                machines, in an interactive manner. Rather than using QTerm to                     QTerm gateway                   0174                                upload or download an entire file, you can write an MTB program                    QTerm gateway                   0175                                that opens the gateway, requests a record from the host                            QTerm gateway                   0176                                processor, receives the record, and displays it on the terminal                    QTerm gateway                   0177                                that requested it. You can also write a program in QICBASIC on                     QTerm gateway                   0178                                the Qantel system that reads and writes to the QTerm session                       QTerm gateway                   0179                                associated with the gateway.                                                       QTerm gateway                   0180                                                                                                                   QTerm gateway                   0181                                One gateway application, already in use, moved a large history                     QTerm gateway                   0182                                file from a Qantel system to a Comet single-user system, and                       QTerm gateway                   0183                                connected the Comet system to the Qantel via QTerm. When a user                    QTerm gateway                   0184                                on the Qantel system needs to see something in the history file,                   QTerm gateway                   0185                                a program is run on the Qantel that writes to one of the QTerm                     QTerm gateway                   0186                                partitions, requesting a record to be read. A program running on                   QTerm gateway                   0187                                the Comet system, receives the request for information by reading                  QTerm gateway                   0188                                the gateway device, and returns the appropriate date to the                        QTerm gateway                   0189                                Qantel by writing to the gateway.                                                  Reading the mouse               0001                              Reading the mouse                                                                    Reading the mouse               0002                              =================                                                                    Reading the mouse               0003                                                                                                                   Reading the mouse               0004                                When a mouse button is been clicked, Comet places 4 bytes (binary                  Reading the mouse               0005                                encoded) into LUN's READ buffer. Your MTB program can determine                    Reading the mouse               0006                                additional information by reading the contents of this buffer.                     Reading the mouse               0007                                                                                                                   Reading the mouse               0008                                The 4 bytes are:                                                                   Reading the mouse               0009                                                                                                                   Reading the mouse               0010                                Byte    Description                                                                Reading the mouse               0011                                ================================================================                   Reading the mouse               0012                                1-2     Screen coordinates where mouse was clicked                                 Reading the mouse               0013                                3       which button was pressed                                                   Reading the mouse               0014                                4       the current state of the mouse buttons                                     Reading the mouse               0015                                                                                                                   Reading the mouse               0016                                See <Reading the mouse pseudocode> for a complete description.                     Reading the mouse               0017                                                                                                                   Reading the mouse               0018                                Also see the <Mouse demo program>.                                                 Reading the mouse               0019                                                                                                                   Reading the mouse               0020                              Example:                                                                             Reading the mouse               0021                                                                                                                   Reading the mouse               0022                                LENGTH 4 & LOCAL DATA$                                                             Reading the mouse               0023                                1000 FORMAT DATA$                                                                  Reading the mouse               0024                                .                                                                                  Reading the mouse               0025                                READ (#,1000)                                                                      Reading the mouse               0026                                                                                                                   Reading the mouse               0027                                The READ instruction returns 4 bytes of data (in binary form)                      Reading the mouse               0028                                from the input buffer.                                                             Reading the mouse pseudocode    0001                              Pseudocode for reading the mouse                                                     Reading the mouse pseudocode    0002                              ================================                                                     Reading the mouse pseudocode    0003                                                                                                                   Reading the mouse pseudocode    0004                                The following outline provides the basic steps for reading the                     Reading the mouse pseudocode    0005                                mouse and interpreting the 4 bytes that are returned by the mouse                  Reading the mouse pseudocode    0006                                driver:                                                                            Reading the mouse pseudocode    0007                                                                                                                   Reading the mouse pseudocode    0008                                a. Declare the variables that will store the mouse information                     Reading the mouse pseudocode    0009                                                                                                                   Reading the mouse pseudocode    0010                                        LENGTH 2 & LOCAL MOUSECURSOR$                                              Reading the mouse pseudocode    0011                                        LENGTH 1 & LOCAL MOUSECLICK;MOUSESTATE$                                    Reading the mouse pseudocode    0012                                                                                                                   Reading the mouse pseudocode    0013                                b. Wait for a mouse click or poll the mouse                                        Reading the mouse pseudocode    0014                                                                                                                   Reading the mouse pseudocode    0015                                c. Read the mouse values (4 bytes, binary encoded)                                 Reading the mouse pseudocode    0016                                                                                                                   Reading the mouse pseudocode    0017                                        MOUSE.INFO: FORMAT MOUSECURSOR$;MOUSECLICK;MOUSESTATE$                     Reading the mouse pseudocode    0018                                        .                                                                          Reading the mouse pseudocode    0019                                        READ (0,MOUSE.INFO)                                                        Reading the mouse pseudocode    0020                                                                                                                   Reading the mouse pseudocode    0021                                d. Decode the mouse values                                                         Reading the mouse pseudocode    0022                                                                                                                   Reading the mouse pseudocode    0023                                        ROW=ASC(MOUSECURSOR$)1                                                    Reading the mouse pseudocode    0024                                        COLUMN=ASC(SUB(MOUSECURSOR$,2,1))                                          Reading the mouse pseudocode    0025                                        BUTTON=ASC(MOUSECLICK$)                                                    Reading the mouse pseudocode    0026                                        MOUSESTATE=ASC(MOUSESTATE$)                                                Reading the mouse pseudocode    0027                                                                                                                   Reading the mouse pseudocode    0028                                e. Interpret the mouse values                                                      Reading the mouse pseudocode    0029                                                                                                                   Reading the mouse pseudocode    0030                                   1.   ROW and COLUMN are the screen coordinates where the mouse                  Reading the mouse pseudocode    0031                                        was clicked                                                                Reading the mouse pseudocode    0032                                                                                                                   Reading the mouse pseudocode    0033                                   2.   BUTTON represents which mouse button was clicked                           Reading the mouse pseudocode    0034                                                                                                                   Reading the mouse pseudocode    0035                                        Value     Button                                                           Reading the mouse pseudocode    0036                                        ============================                                               Reading the mouse pseudocode    0037                                        1         Left                                                             Reading the mouse pseudocode    0038                                        2         Right                                                            Reading the mouse pseudocode    0039                                        3         Left and right                                                   Reading the mouse pseudocode    0040                                        4         Center                                                           Reading the mouse pseudocode    0041                                        5         Center and left                                                  Reading the mouse pseudocode    0042                                        6         Center and right                                                 Reading the mouse pseudocode    0043                                        7         All three                                                        Reading the mouse pseudocode    0044                                                                                                                   Reading the mouse pseudocode    0045                                   3.   MOUSESTATE represents the current state of the mouse                       Reading the mouse pseudocode    0046                                                                                                                   Reading the mouse pseudocode    0047                                        Value     State                                                            Reading the mouse pseudocode    0048                                        ==============================                                             Reading the mouse pseudocode    0049                                        1         Left button down                                                 Reading the mouse pseudocode    0050                                        2         Right button down                                                Reading the mouse pseudocode    0051                                        4         Center button down                                               Reading the mouse pseudocode    0052                                                                                                                   Reading the mouse pseudocode    0053                                   Your program can utilize this information in whatever manner                    Reading the mouse pseudocode    0054                                   you choose. You can establish "hot" zones on the screen where                   Reading the mouse pseudocode    0055                                   a mouse click will cause some specific action to take place,                    Reading the mouse pseudocode    0056                                   you can test for different mouse buttons (up or down), and you                  Reading the mouse pseudocode    0057                                   can use the enhanced graphics characters to display items such                  Reading the mouse pseudocode    0058                                   as radio buttons and check boxes.                                               Regular cursor display          0001                              Regular cursor display                                                               Regular cursor display          0002                              ======================                                                               Regular cursor display          0003                                                                                                                   Regular cursor display          0004                                The regular cursor may be shown or hidden. For keyboard-driven                     Regular cursor display          0005                                applications, you will normally want to make the regular cursor                    Regular cursor display          0006                                visible (the default). For mouse-driven applications and touch-                    Regular cursor display          0007                                screen applications, you will normally want to make the regular                    Regular cursor display          0008                                cursor invisible.                                                                  Regular cursor display          0009                                                                                                                   Regular cursor display          0010                                1. To show the regular cursor, use the following instruction:                      Regular cursor display          0011                                                                                                                   Regular cursor display          0012                                        PRINT (0) <(Show cursor),#HELPMT3>                                         Regular cursor display          0013                                                                                                                   Regular cursor display          0014                                2. To hide the regular cursor, use the following instruction:                      Regular cursor display          0015                                                                                                                   Regular cursor display          0016                                        PRINT (0) <(Hide cursor),#HELPMT3>                                         Regular cursor display          0017                                                                                                                   Regular cursor display          0018                                Also see <Show/hide the mouse cursor>.                                             Sample window program           0001                              Sample window program                                                                Sample window program           0002                              =====================                                                                Sample window program           0003                                                                                                                   Sample window program           0004                                Print (0) (Create window=2,3,70,20)                                                Sample window program           0005                                Print (0) (Change colors="@0F@","@A0@","@00@","@C0@","@00@")                       Sample window program           0006                                Print (0) (SB);"This is the first window.";(BF);(BF);(BF);(BF)                     Sample window program           0007                                Print (0) "Hello",@(2,2)                                                           Sample window program           0008                                Input (0) ""                                                                       Sample window program           0009                                Print (0) (Create window=10,5,60,12)                                               Sample window program           0010                                Print (0) (Change colors="@0F@","@CF@","@00@","@90@","@00@")                       Sample window program           0011                                Print (0) (SB);"This is the second window.";(BF);(BF);(BF);(BF)                    Sample window program           0012                                Print (0) "Hello",@(2,2)                                                           Sample window program           0013                                Input (0) ""                                                                       Sample window program           0014                                Print (0) (Create window=8,1,75,15)                                                Sample window program           0015                                Print (0) (Change colors="@0F@","@E0@","@00@","@F0@","@00@")                       Sample window program           0016                                Print (0) (SB);"This is the third window.";(BF);(BF);(BF);(BF)                     Sample window program           0017                                Print (0) "Hello",@(2,2)                                                           Sample window program           0018                                Input (0) ""                                                                       Sample window program           0019                                Print (0) (Create window=0,11,50,21)                                               Sample window program           0020                                Print (0) (Change colors="@0F@","@F0@","@00@","@30@","@00@")                       Sample window program           0021                                Print (0) (SB);"This is the fourth window.";(BF);(BF);(BF);(BF)                    Sample window program           0022                                Print (0) "Hello",@(2,2)                                                           Sample window program           0023                                Input (0) ""                                                                       Sample window program           0024                                                                                                                   Sample window program           0025                                Print (0) (Delete window)     ! Close the 4th window                               Sample window program           0026                                    Print (0) (CH)             ! Position cursor in 3rd window                     Sample window program           0027                                    Input (0) ""               ! Hold it...                                        Sample window program           0028                                                                                                                   Sample window program           0029                                Print (0) (Delete window)     ! Close the 3rd window                               Sample window program           0030                                    Print (0) (CH)             ! Position cursor in 2nd window                     Sample window program           0031                                    Input (0) ""               ! Hold it...                                        Sample window program           0032                                                                                                                   Sample window program           0033                                Print (0) (Delete window)     ! Close the 2nd window                               Sample window program           0034                                    Print (0) (CH)             ! Position cursor in 1st window                     Sample window program           0035                                    Input (0) ""               ! Hold it...                                        Sample window program           0036                                                                                                                   Sample window program           0037                                Print (0) (Delete window)     ! Close the 1st window                               Sample window program           0038                                                                                                                   Sample window program           0039                                Run "QMONITOR"                                                                     Sample window program           0040                                End                                                                                Scan Codes                      0001                              Scan Codes                                                                           Scan Codes                      0002                              ==========                                                                           Scan Codes                      0003                                                                                                                   Scan Codes                      0004                                MTB supports direct interception of special keys (function keys,                   Scan Codes                      0005                                control keys, directional keys, etc.) by using the standard                        Scan Codes                      0006                                hardware scan codes.                                                               Scan Codes                      0007                                                                                                                   Scan Codes                      0008                                For example, the scan code for the PgUp key is 73 (hex "@49@"),                    Scan Codes                      0009                                and the scan code for the left arrow is 75 (hex "@4B@").                           Scan Codes                      0010                                                                                                                   Scan Codes                      0011                                There are two scan modes available:                                                Scan Codes                      0012                                a. partial scan mode (see <Partial Scan Codes,#HELPMT6>)                           Scan Codes                      0013                                b. full scan mode (see <Full Scan Codes,#HELPMT6>)                                 Scan Codes                      0014                                                                                                                   Scan Codes                      0015                                The following mnemonics set the scan code modes:                                   Scan Codes                      0016                                <(Partial Scan Codes On),#HELPMT3>                                                 Scan Codes                      0017                                <(Full Scan Codes Passed),#HELPMT3>                                                Scan Codes                      0018                                                                                                                   Scan Codes                      0019                                When either of these modes is turned on, pressing one of the                       Scan Codes                      0020                                special keys interrupts the MTB program waiting for data, and                      Scan Codes                      0021                                passes the scan code to the waiting data variable.                                 Scan Codes                      0022                                                                                                                   Scan Codes                      0023                                   PRINT (0) (Partial Scan Codes On)  ! set mode                                   Scan Codes                      0024                                   .                                                                               Scan Codes                      0025                                   INPUT (0) DATA$     ! wait for input or special key                             Scan Codes                      0026                                                                                                                   Scan Codes                      0027                                The scan code is made up of 2 bytes. The first bytes is a hex                      Scan Codes                      0028                                "@00@" is a scan code follows, and the second byte is the scan                     Scan Codes                      0029                                code itself (in hex). If the first byte is not "@00@" you can                      Scan Codes                      0030                                assume that the transmit contains data (and not a scan code).                      Scan Codes                      0031                                                                                                                   Scan Codes                      0032                                   LENGTH 2 & LOCAL DATA$                                                          Scan Codes                      0033                                   .                                                                               Scan Codes                      0034                                   PRINT (0) (Partial Scan Codes On)  ! set mode                                   Scan Codes                      0035                                   .                                                                               Scan Codes                      0036                                   INPUT (0) DATA$     ! wait for input or special key                             Scan Codes                      0037                                                                                                                   Scan Codes                      0038                                   IF SUB(DATA$,1,1) NE "@00@" THEN GOTO PROCESS                                   Scan Codes                      0039                                                                                                                   Scan Codes                      0040                                   IF SUB(DATA$,2,1) EQ "@49@" THEN.. ! PgUp key                                   Scan Codes                      0041                                                                                                                   Scan Codes                      0042                                   IF SUB(DATA$,2,1) EQ "@4B@" THEN.. ! left arrow                                 Scan Codes                      0043                                   .                                                                               Scan Codes                      0044                                   .                                                                               Scan Codes                      0045                                   PROCESS:                           ! data value                                 Setting window colors           0001                              Setting window colors                                                                Setting window colors           0002                              =====================                                                                Setting window colors           0003                                                                                                                   Setting window colors           0004                                Typically, Comet windows are created with a different color                        Setting window colors           0005                                scheme than the underlying display. This is done with the                          Setting window colors           0006                                <(Change Colors),#HELPMT3> mnemonic.                                               Setting window colors           0007                                                                                                                   Setting window colors           0008                                Also see <Screen Colors,#HELPMT6>.                                                 Setting window colors           0009                                                                                                                   Setting window colors           0010                              Example:                                                                             Setting window colors           0011                                                                                                                   Setting window colors           0012                                PRINT (0) (Create Window=2,3,70,20)                                                Setting window colors           0013                                PRINT (0) (Change colors="@0F@","@A0@","@00@","@C0@","@00@")                       Setting window colors           0014                                                                                                                   Setting window colors           0015                                The first PRINT statement creates a window from column 2, row 3                    Setting window colors           0016                                (the upper left corner) to column 70, row 20 (the lower right                      Setting window colors           0017                                corner). The second PRINT statement changes the color of the                       Setting window colors           0018                                window as follows:                                                                 Setting window colors           0019                                                                                                                   Setting window colors           0020                                Foreground = black field (0) with bright white characters (F)                      Setting window colors           0021                                Background = light green field (A) with black characters (0)                       Setting window colors           0022                                Invisible = black field (0) with black characters (0)                              Setting window colors           0023                                Border = light red (C)                                                             Setting window colors           0024                                Entry = black field (0) with black characters (0)                                  Show/hide the mouse cursor      0001                              Show/hide the mouse cursor                                                           Show/hide the mouse cursor      0002                              ==========================                                                           Show/hide the mouse cursor      0003                                                                                                                   Show/hide the mouse cursor      0004                                The mouse cursor may be shown or hidden. For mouse-driven                          Show/hide the mouse cursor      0005                                applications, you will normally want to show the mouse cursor.                     Show/hide the mouse cursor      0006                                For touch-sensitive screen applications, you will normally want                    Show/hide the mouse cursor      0007                                to hide the mouse cursor.                                                          Show/hide the mouse cursor      0008                                                                                                                   Show/hide the mouse cursor      0009                                1. To show the mouse cursor, use the following instructions:                       Show/hide the mouse cursor      0010                                                                                                                   Show/hide the mouse cursor      0011                                        PRINT (0) <(Show Mouse Cursor),#HELPMT3>                                   Show/hide the mouse cursor      0012                                                                                                                   Show/hide the mouse cursor      0013                                2. To hide the mouse cursor, use the following instruction:                        Show/hide the mouse cursor      0014                                                                                                                   Show/hide the mouse cursor      0015                                        PRINT (0) <(Hide Mouse Cursor),#HELPMT3>                                   Show/hide the mouse cursor      0016                                                                                                                   Show/hide the mouse cursor      0017                                Also see <Regular cursor display>.                                                 Sort ascending in memory        0001                              Statement:                                                                           Sort ascending in memory        0002                                                                                                                   Sort ascending in memory        0003                                FILE (lun) CTL="@00@"                                                              Sort ascending in memory        0004                                                                                                                   Sort ascending in memory        0005                              Discussion:                                                                          Sort ascending in memory        0006                                                                                                                   Sort ascending in memory        0007                                This statement begins an ascending sort (in memory). Use this                      Sort ascending in memory        0008                                control code only if the amount of data to be sorted is less than                  Sort ascending in memory        0009                                64K.                                                                               Sort ascending in memory        0010                                                                                                                   Sort ascending in memory        0011                                The (lun) parameter is the logical unit number of the sort                         Sort ascending in memory        0012                                gateway device which has been previously opened in your program.                   Sort ascending sort/merge       0001                              Statement:                                                                           Sort ascending sort/merge       0002                                                                                                                   Sort ascending sort/merge       0003                                FILE (lun) CTL="@04xxyy@"                                                          Sort ascending sort/merge       0004                                                                                                                   Sort ascending sort/merge       0005                              Discussion:                                                                          Sort ascending sort/merge       0006                                                                                                                   Sort ascending sort/merge       0007                                This statement specifies ascending sort/merge, where xx and yy                     Sort ascending sort/merge       0008                                are the logical unit numbers in hex of two open Comet sequential                   Sort ascending sort/merge       0009                                work files. The record size of the work files should be the same                   Sort ascending sort/merge       0010                                as the size of the records to be sorted. Use this control code if                  Sort ascending sort/merge       0011                                the amount of data to be sorted exceeds 64K or if you are not                      Sort ascending sort/merge       0012                                certain how much data is to be sorted.                                             Sort ascending sort/merge       0013                                                                                                                   Sort ascending sort/merge       0014                                The (lun) parameter is the logical unit number of the sort                         Sort ascending sort/merge       0015                                gateway device which has been previously opened in your program.                   Sort begin sort/merge           0001                              Statement:                                                                           Sort begin sort/merge           0002                                                                                                                   Sort begin sort/merge           0003                                FILE (lun) CTL="@06@"                                                              Sort begin sort/merge           0004                                                                                                                   Sort begin sort/merge           0005                              Discussion:                                                                          Sort begin sort/merge           0006                                                                                                                   Sort begin sort/merge           0007                                This statement begins the sort/merge operation. Use this control                   Sort begin sort/merge           0008                                code if the amount of data to be sorted exceeds 64K.                               Sort begin sort/merge           0009                                                                                                                   Sort begin sort/merge           0010                                The (lun) parameter is the logical unit number of the sort                         Sort begin sort/merge           0011                                gateway device which has been previously opened in your program.                   Sort descending in memory       0001                              Statement:                                                                           Sort descending in memory       0002                                                                                                                   Sort descending in memory       0003                                FILE (lun) CTL="@01@"                                                              Sort descending in memory       0004                                                                                                                   Sort descending in memory       0005                              Discussion:                                                                          Sort descending in memory       0006                                                                                                                   Sort descending in memory       0007                                This statement begins a descending sort (in memory). Use this                      Sort descending in memory       0008                                control code if you are certain that the amount of data to be                      Sort descending in memory       0009                                sorted is less than or equal to 64K.                                               Sort descending in memory       0010                                                                                                                   Sort descending in memory       0011                                The (lun) parameter is the logical unit number of the sort                         Sort descending in memory       0012                                gateway device which has been previously opened in your program.                   Sort descending sort/merge      0001                              Statement:                                                                           Sort descending sort/merge      0002                                                                                                                   Sort descending sort/merge      0003                                FILE (lun) CTL="@05xxyy@"                                                          Sort descending sort/merge      0004                                                                                                                   Sort descending sort/merge      0005                              Discussion:                                                                          Sort descending sort/merge      0006                                                                                                                   Sort descending sort/merge      0007                                This statement specifies descending sort/merge, where xx and yy                    Sort descending sort/merge      0008                                are the logical unit numbers in hex of two open Comet sequential                   Sort descending sort/merge      0009                                work files. The record size of the work files should be the same                   Sort descending sort/merge      0010                                as the size of the records to be sorted. Use this control code if                  Sort descending sort/merge      0011                                the amount of data to be sorted exceeds 64K or if you are not                      Sort descending sort/merge      0012                                certain how much data is to be sorted.                                             Sort descending sort/merge      0013                                                                                                                   Sort descending sort/merge      0014                                The (lun) parameter is the logical unit number of the sort                         Sort descending sort/merge      0015                                gateway device which has been previously opened in your program.                   Sort gateway                    0001                              Sort gateway                                                                         Sort gateway                    0002                              ============                                                                         Sort gateway                    0003                                                                                                                   Sort gateway                    0004                                Comet includes the ability to communicate with specialized                         Sort gateway                    0005                                external software routines. These interfaces are accomplished via                  Sort gateway                    0006                                Comet gateways. The sort gateway provides an efficient sorting                     Sort gateway                    0007                                method for both The Reporter and your MTB applications.                            Sort gateway                    0008                                                                                                                   Sort gateway                    0009                                If the data to be sorted takes up less than 64K bytes, the                         Sort gateway                    0010                                external sort driver routine performs the sort function in                         Sort gateway                    0011                                memory, and offers a the fastest sort yet available on a Comet                     Sort gateway                    0012                                system. For data greater than 64K, the sort driver performs its                    Sort gateway                    0013                                sorting using temporary disk files (either RAM disk or hard                        Sort gateway                    0014                                disk). Both the disk and memory sort routines are based on the                     Sort gateway                    0015                                popular "median of three recursive quicksort" algorithm published                  Sort gateway                    0016                                by Spontaneous Assembly, Inc.                                                      Sort gateway                    0017                                                                                                                   Sort gateway                    0018                                The external sort driver routine is configured as a gateway                        Sort gateway                    0019                                device in the QCFIG program, and is named with the standard Comet                  Sort gateway                    0020                                gateway conventions of G00, G01, etc. You may configure more than                  Sort gateway                    0021                                one sort gateway, in the case of multiple users wanting to                         Sort gateway                    0022                                perform sorting operations simultaneously.                                         Sort gateway                    0023                                                                                                                   Sort gateway                    0024                                Each configured sort gateway requires 64K of system memory above                   Sort gateway                    0025                                and beyond the other memory required for Comet. This memory is                     Sort gateway                    0026                                allocated when Comet is started and is reserved for sorting                        Sort gateway                    0027                                purposes as long as Comet is executing. In effect, the sort areas                  Sort gateway                    0028                                function as "background" memory areas for Comet. But, instead of                   Sort gateway                    0029                                functioning as general purpose memory partitions, the sort areas                   Sort gateway                    0030                                are used exclusively for sorting data.                                             Sort gateway                    0031                                                                                                                   Sort gateway                    0032                              Implementation                                                                       Sort gateway                    0033                              ==============                                                                       Sort gateway                    0034                                                                                                                   Sort gateway                    0035                                To implement the sort gateway, configure a type-2 gateway device                   Sort gateway                    0036                                using the QCFIG program. Configure one sort gateway for each                       Sort gateway                    0037                                simultaneous sort user. Subsequently, when Comet is started, 64K                   Sort gateway                    0038                                of memory will be allocated for each sort driver gateway.                          Sort gateway                    0039                                                                                                                   Sort gateway                    0040                                For in-memory sorts (up to 64K of data), your program must write                   Sort gateway                    0041                                data records to the gateway sort area, then issue the appropriate                  Sort gateway                    0042                                control code to execute the sort (see the next page for the                        Sort gateway                    0043                                control parameters). For sorts larger than 64K, you must first                     Sort gateway                    0044                                create two Comet sequential work files. Then, as your program                      Sort gateway                    0045                                writes data records to the sort gateway, the records are placed                    Sort gateway                    0046                                in the work files and subsequently sorted and merged together.                     Sort gateway                    0047                                                                                                                   Sort gateway                    0048                                Sorting is done from the left to the right in the data records.                    Sort gateway                    0049                                The quicksort algorithm determines when further sorting is not                     Sort gateway                    0050                                needed and terminates the sorting routine accordingly. During the                  Sort gateway                    0051                                sorting operation, your program is suspended (i.e., it does                        Sort gateway                    0052                                proceed to the next MTB instruction). Thus, from your program's                    Sort gateway                    0053                                point of view, sorting itself is a single instruction.                             Sort gateway                    0054                                                                                                                   Sort gateway                    0055                                Once the sort operation is complete, your program may read the                     Sort gateway                    0056                                sorted records from the gateway in the same fashion it would read                  Sort gateway                    0057                                records from a sequential file.                                                    Sort gateway                    0058                                                                                                                   Sort gateway                    0059                                The sort driver routine is called from your MTB program using the                  Sort gateway                    0060                                <FILE,#HELPMT4> statement.                                                         Sort gateway                    0061                                                                                                                   Sort gateway                    0062                                                                                                                   Sort gateway                    0063                                The following control options are available for the sort driver                    Sort gateway                    0064                                gateway. All of these are implemented with the <FILE,#HELPMT4>                     Sort gateway                    0065                                statement.                                                                         Sort gateway                    0066                                                                                                                   Sort gateway                    0067                                   <Sort ascending in memory>                                                      Sort gateway                    0068                                   <Sort descending in memory>                                                     Sort gateway                    0069                                   <Sort record length>                                                            Sort gateway                    0070                                   <Sort move pointer to top>                                                      Sort gateway                    0071                                   <Sort ascending sort/merge>                                                     Sort gateway                    0072                                   <Sort descending sort/merge>                                                    Sort gateway                    0073                                   <Sort begin sort/merge>                                                         Sort gateway                    0074                                                                                                                   Sort gateway                    0075                              Examples:                                                                            Sort gateway                    0076                                                                                                                   Sort gateway                    0077                                   <Pseudocode for in-memory sort>                                                 Sort gateway                    0078                                   <Pseudocode for sort/merge>                                                     Sort gateway                    0079                                                                                                                   Sort gateway                    0080                              Notes                                                                                Sort gateway                    0081                              =====                                                                                Sort gateway                    0082                                                                                                                   Sort gateway                    0083                                *  When your program closes the sort gateway, the corresponding                    Sort gateway                    0084                                   sort area is cleared. This prevents subsequent users from                       Sort gateway                    0085                                   opening the same gateway and accessing the data your program                    Sort gateway                    0086                                   had placed in the sort area.                                                    Sort gateway                    0087                                                                                                                   Sort gateway                    0088                                *  Since the Comet sort driver provides access to a 64K byte area                  Sort gateway                    0089                                   of memory, your application program could use this area as a                    Sort gateway                    0090                                   "buffer" or a large array without even doing a sort (i.e., you                  Sort gateway                    0091                                   could read and write records to the sort area, as necessary).                   Sort gateway                    0092                                   This suggests other uses not immediately apparent to Signature                  Sort gateway                    0093                                   Systems.                                                                        Sort move pointer to top        0001                              Statement:                                                                           Sort move pointer to top        0002                                                                                                                   Sort move pointer to top        0003                                FILE (lun) CTL="@03@"                                                              Sort move pointer to top        0004                                                                                                                   Sort move pointer to top        0005                              Discussion:                                                                          Sort move pointer to top        0006                                                                                                                   Sort move pointer to top        0007                                This statement moves the read pointer to the first record in the                   Sort move pointer to top        0008                                sort area (in effect, to the "beginning of file"). Subsequent                      Sort move pointer to top        0009                                reads from the sort area will proceed from the first record.                       Sort move pointer to top        0010                                                                                                                   Sort move pointer to top        0011                                The (lun) parameter is the logical unit number of the sort                         Sort move pointer to top        0012                                gateway device which has been previously opened in your program.                   Sort record length              0001                              Statement:                                                                           Sort record length              0002                                                                                                                   Sort record length              0003                                FILE (lun) CTL="@02xxxx@"                                                          Sort record length              0004                                                                                                                   Sort record length              0005                              Discussion:                                                                          Sort record length              0006                                                                                                                   Sort record length              0007                                This statement sets the record length for sort records, where                      Sort record length              0008                                xxxx is the number of bytes in hex. The maximum value is 0400 hex                  Sort record length              0009                                (1,024 decimal).                                                                   Sort record length              0010                                                                                                                   Sort record length              0011                                The (lun) parameter is the logical unit number of the sort                         Sort record length              0012                                gateway device which has been previously opened in your program.                   Using the Automatic Help Feature0001                              Using the Automatic Help Feature                                                     Using the Automatic Help Feature0002                              ================================                                                     Using the Automatic Help Feature0003                                                                                                                   Using the Automatic Help Feature0004                                The Automatic Help feature combines the <(Invoke HELP),#HELPMT3>                   Using the Automatic Help Feature0005                                mnemonic with a specific entry in the #NOVA control file.                          Using the Automatic Help Feature0006                                                                                                                   Using the Automatic Help Feature0007                                Here are the basic steps to follow:                                                Using the Automatic Help Feature0008                                                                                                                   Using the Automatic Help Feature0009                                1. Using Comet utility #43 (NOVAMNT), add an entry to the #NOVA                    Using the Automatic Help Feature0010                                   control file in the Auto Help field.                                            Using the Automatic Help Feature0011                                                                                                                   Using the Automatic Help Feature0012                                   This entry is one of the standard action codes supported by                     Using the Automatic Help Feature0013                                   the NOVA system, including:                                                     Using the Automatic Help Feature0014                                                                                                                   Using the Automatic Help Feature0015                                   Code Action                                                                     Using the Automatic Help Feature0016                                   ==============================================================                  Using the Automatic Help Feature0017                                   H    Run the Comet Help System                                                  Using the Automatic Help Feature0018                                   E    Enter a subprogram                                                         Using the Automatic Help Feature0019                                   S    Shell to DOS                                                               Using the Automatic Help Feature0020                                   T    Display a text string                                                      Using the Automatic Help Feature0021                                                                                                                   Using the Automatic Help Feature0022                                   Also see <Working with the #NOVA Control File>.                                 Using the Automatic Help Feature0023                                                                                                                   Using the Automatic Help Feature0024                                2. Within an MTB program, add the (Invoke HELP) mnemonic prior to                  Using the Automatic Help Feature0025                                   the INPUT statement where the automatic help action is to take                  Using the Automatic Help Feature0026                                   effect.                                                                         Using the Automatic Help Feature0027                                                                                                                   Using the Automatic Help Feature0028                                   Example:                                                                        Using the Automatic Help Feature0029                                                                                                                   Using the Automatic Help Feature0030                                   PRINT (0) (Invoke HELP)  ! Set the automatic help flag                          Using the Automatic Help Feature0031                                   .                                                                               Using the Automatic Help Feature0032                                   INPUT (0) WHATEVER$      ! Perform the automatic help action                    Using the Automatic Help Feature0033                                                            ! as specified in the #NOVA control                    Using the Automatic Help Feature0034                                                            ! file, then return to this INPUT                      Using the Automatic Help Feature0035                                                            ! statement                                            Using the Automatic Help Feature0036                                                                                                                   Using the Automatic Help Feature0037                                   The (Invoke HELP) mnemonic sets a flag within Comet. At the                     Using the Automatic Help Feature0038                                   next INPUT statement in the program, this flag is examined; if                  Using the Automatic Help Feature0039                                   the flag is on, Comet reads the #NOVA control file and takes                    Using the Automatic Help Feature0040                                   the action specified in the "automatic help" record.                            Using the Automatic Help Feature0041                                                                                                                   Using the Automatic Help Feature0042                                   The result is a "pop-up" help feature, where a help action                      Using the Automatic Help Feature0043                                   will occur automatically at a given INPUT prompt without the                    Using the Automatic Help Feature0044                                   operator pressing one of the NOVA function keys.                                Using the Automatic Help Feature0045                                                                                                                   Using the Automatic Help Feature0046                                   The (Invoke HELP) control remains in effect only for the                        Using the Automatic Help Feature0047                                   following INPUT statement (i.e., the auto help flag is turned                   Using the Automatic Help Feature0048                                   off when automatic help is invoked). To use this feature                        Using the Automatic Help Feature0049                                   repeatedly, you must use the (Invoke HELP) mnemonic                             Using the Automatic Help Feature0050                                   repeatedly.                                                                     Window memory                   0001                              Window memory                                                                        Window memory                   0002                              =============                                                                        Window memory                   0003                                                                                                                   Window memory                   0004                                The amount of available window memory is set in the QCFIG                          Window memory                   0005                                program, and is allocated in 4K blocks.                                            Window memory                   0006                                                                                                                   Window memory                   0007                                When a window is created, the amount of available window memory                    Window memory                   0008                                decreases by the size of the window. To determine how much window                  Window memory                   0009                                memory remains, perform a numeric input immediately following the                  Window memory                   0010                                creation of a window.                                                              Window memory                   0011                                                                                                                   Window memory                   0012                              Example:                                                                             Window memory                   0013                                                                                                                   Window memory                   0014                                LENGTH 5.0 & LOCAL MEMSPACE           ! Numeric variable                           Window memory                   0015                                .                                                                                  Window memory                   0016                                PRINT (0) (Create Window=2,3,70,20)   ! Create a window                            Window memory                   0017                                INPUT (0) MEMSPACE                    ! Remaining window memory                    Windows title line              0001                              Windows title line                                                                   Windows title line              0002                              ==================                                                                   Windows title line              0003                                                                                                                   Windows title line              0004                                The following mnemonics display a title line for the window:                       Windows title line              0005                                                                                                                   Windows title line              0006                                <(Window Title Background),#HELPMT3>                                               Windows title line              0007                                <(Window Title Foreground),#HELPMT3>                                               Working with the #NOVA Control F0001                              Working with the #NOVA Control File                                                  Working with the #NOVA Control F0002                              ===================================                                                  Working with the #NOVA Control F0003                                                                                                                   Working with the #NOVA Control F0004                                An integral part of the NOVA System is the #NOVA control file.                     Working with the #NOVA Control F0005                                This keyed file determines what action will be taken when the                      Working with the #NOVA Control F0006                                operator presses one of the NOVA function keys or when the                         Working with the #NOVA Control F0007                                program uses the <(Invoke HELP),#HELPMT3> mnemonic.                                Working with the #NOVA Control F0008                                                                                                                   Working with the #NOVA Control F0009                                For example, assume that the operator presses the F1 function                      Working with the #NOVA Control F0010                                key. At this point, Comet suspends the current program and enters                  Working with the #NOVA Control F0011                                the NOVA subprogram. NOVA opens the #NOVA file and examines the                    Working with the #NOVA Control F0012                                record associated with the F1 key, then carries out the specified                  Working with the #NOVA Control F0013                                action (i.e., runs the Comet Help System, enters a specified                       Working with the #NOVA Control F0014                                subprogram, shells to DOS, or displays a text string).                             Working with the #NOVA Control F0015                                                                                                                   Working with the #NOVA Control F0016                                There are "system records" and "terminal records" in the #NOVA                     Working with the #NOVA Control F0017                                file. The system records contain action codes for all of the                       Working with the #NOVA Control F0018                                users in the system, while terminal records contain overriding                     Working with the #NOVA Control F0019                                action codes for specific terminals.                                               Working with the #NOVA Control F0020                                                                                                                   Working with the #NOVA Control F0021                                MTB programs can dynamically update the #NOVA file. Here is the                    Working with the #NOVA Control F0022                                structure of the file:                                                             Working with the #NOVA Control F0023                                                                                                                   Working with the #NOVA Control F0024                                File type:   Keyed                                                                 Working with the #NOVA Control F0025                                Key size:    7                                                                     Working with the #NOVA Control F0026                                Record size: 64                                                                    Working with the #NOVA Control F0027                                                                                                                   Working with the #NOVA Control F0028                                Key format:  Position  Length    Description                                       Working with the #NOVA Control F0029                                             ====================================================                  Working with the #NOVA Control F0030                                             1         4         "SYS " or terminal number                         Working with the #NOVA Control F0031                                             5         3         function key code:                                Working with the #NOVA Control F0032                                                                 000  automatic help                               Working with the #NOVA Control F0033                                                                 001  F1                                           Working with the #NOVA Control F0034                                                                 002  F11                                          Working with the #NOVA Control F0035                                                                 003  F12                                          Working with the #NOVA Control F0036                                                                 004  Shift F1                                     Working with the #NOVA Control F0037                                                                 005  Shift F2                                     Working with the #NOVA Control F0038                                                                 006  Shift F3                                     Working with the #NOVA Control F0039                                                                 007  Shift F4                                     Working with the #NOVA Control F0040                                                                 008  Shift F5                                     Working with the #NOVA Control F0041                                                                 009  Shift F6                                     Working with the #NOVA Control F0042                                                                 00A  Shift F7                                     Working with the #NOVA Control F0043                                                                 00B  Shift F8                                     Working with the #NOVA Control F0044                                                                 00C  Shift F9                                     Working with the #NOVA Control F0045                                                                 00D  Shift F10                                    Working with the #NOVA Control F0046                                                                 00E  Shift F11                                    Working with the #NOVA Control F0047                                                                 00F  Shift F12                                    Working with the #NOVA Control F0048                                                                                                                   Working with the #NOVA Control F0049                                Record:      Position  Length    Description                                       Working with the #NOVA Control F0050                                             ====================================================                  Working with the #NOVA Control F0051                                             1         4         "SYS " or terminal number                         Working with the #NOVA Control F0052                                             5         3         function key code (see key)                       Working with the #NOVA Control F0053                                             8         1         action code:                                      Working with the #NOVA Control F0054                                                                 H = run Comet Help System                         Working with the #NOVA Control F0055                                                                 E = enter subprogram                              Working with the #NOVA Control F0056                                                                 S = shell to DOS                                  Working with the #NOVA Control F0057                                                                 T = display text string                           Working with the #NOVA Control F0058                                             9         8         subprogram name (E option)                        Working with the #NOVA Control F0059                                             17        3         directory name (E option)                         Working with the #NOVA Control F0060                                             20        40        message string:                                   Working with the #NOVA Control F0061                                                                 message in COMMON (E option)                      Working with the #NOVA Control F0062                                                                 DOS command/program (S option)                    Working with the #NOVA Control F0063                                                                 text string (T option)                            Working with the #NOVA Control F0064                                                                                                                   Working with the #NOVA Control F0065                                Default records in the #NOVA file (when the file is created):                      Working with the #NOVA Control F0066                                                                                                                   Working with the #NOVA Control F0067                                Key     Record                   Meaning                                           Working with the #NOVA Control F0068                                =================================================================                  Working with the #NOVA Control F0069                                SYS 001 SYS 001H                 F1 = run the Comet Help System                    Working with the #NOVA Control F0070                                SYS 002 SYS 002ECMHELPB          F11 = enter CMHELPB (build mode)                  Working with the #NOVA Control F0071                                SYS 003 SYS 003EPRTSCRN          F12 = enter the PRTSCRN applet                    Working with the #NOVA Control F0072                                SYS 004 SYS 004EKEYCAP           Shift F1 = enter KEYCAP applet                    Working with the #NOVA Control F0073                                                                                                                   Working with the #NOVA Control F0074                              Usefile:                                                                             Working with the #NOVA Control F0075                                                                                                                   Working with the #NOVA Control F0076                                The XNOVACM usefile is provided in the utility program source                      Working with the #NOVA Control F0077                                directory. Here is a listing of the usefile.                                       Working with the #NOVA Control F0078                                                                                                                   Working with the #NOVA Control F0079                                !                                                                                  Working with the #NOVA Control F0080                                !  FILE #NOVA - MASTER SPECIAL KEY DISPATCH FILE                                   Working with the #NOVA Control F0081                                !                                                                                  Working with the #NOVA Control F0082                                !  KEY SIZE:  7  ( TXX$ + FKEY$ )                                                  Working with the #NOVA Control F0083                                !  REC SIZE: 64                                                                    Working with the #NOVA Control F0084                                !                                                                                  Working with the #NOVA Control F0085                                   LENGTH   1  & LOCAL ACTION$                                                     Working with the #NOVA Control F0086                                   LENGTH   3  & LOCAL FKEY$ DIR$                                                  Working with the #NOVA Control F0087                                   LENGTH   4  & LOCAL TXX$                                                        Working with the #NOVA Control F0088                                   LENGTH   8  & LOCAL PROGRAM$                                                    Working with the #NOVA Control F0089                                   LENGTH  40  & LOCAL MSG$                                                        Working with the #NOVA Control F0090                                !                                                                                  Working with the #NOVA Control F0091                                NOVA:  FORMAT _                                                                    Working with the #NOVA Control F0092                                       TXX$;_                      ! TERMINAL # OR "SYS "                          Working with the #NOVA Control F0093                                       FKEY$;_                     ! CODE FOR KEY PRESSED                          Working with the #NOVA Control F0094                                       ACTION$;_                   ! WHAT TO DO ...                                Working with the #NOVA Control F0095                                               _                   !  H-HELP MESSAGE/LOOKUP PROG.                  Working with the #NOVA Control F0096                                               _                   !  R-RUN A PROGRAM                              Working with the #NOVA Control F0097                                               _                   !  S-SHELL TO DOS                               Working with the #NOVA Control F0098                                               _                   !  T-ECHO KEYSTROKES                            Working with the #NOVA Control F0099                                       PROGRAM$;_                  ! PROGRAM TO RUN                                Working with the #NOVA Control F0100                                       DIR$;_                      ! DIR FOR PROGRAM$                              Working with the #NOVA Control F0101                                       MSG$                        ! TEXT TO ECHO OR MSG TO PASS                   Working with the #NOVA Control F0102                                !                                                                                  Working with the #NOVA Control F0103                                !                                                                                  Working with the #NOVA Control F0104                                !                                                                                  Working with the #NOVA Control F0105                                !  NOTE:  TXX$ IS "SYS" FOR SYSTEM DEFAULT RECORD                                  Working with the #NOVA Control F0106                                !                                                                                  Working with the #NOVA Control F0107                                !                                                                                  Working with the #NOVA Control F0108                                                                                                                   Working with the #NOVA Control F0109                              Function keys                                                                        Working with the #NOVA Control F0110                              =============                                                                        Working with the #NOVA Control F0111                                                                                                                   Working with the #NOVA Control F0112                                To determine which key was pressed, add the following code to                      Working with the #NOVA Control F0113                                your program:                                                                      Working with the #NOVA Control F0114                                                                                                                   Working with the #NOVA Control F0115                                   KEYCODE=ASC(RSUB(HFLAG$),1,1)                                                   Working with the #NOVA Control F0116                                   FKEY$=RSUB(STRING(KEYCODE+1000),2,3)                                            Working with the #NOVA Control F0117                                                                                                                   Working with the #NOVA Control F0118                                For example, the following instructions test for the F12 key:                      Working with the #NOVA Control F0119                                                                                                                   Working with the #NOVA Control F0120                                   KEYCODE=ASC(RSUB(HFLAG$),1,1)                                                   Working with the #NOVA Control F0121                                   FKEY$=RSUB(STRING(KEYCODE+1000),2,3)                                            Working with the #NOVA Control F0122                                   IF FKEY$ = "003" THEN ...                                                       sample mouse open               0001                              Sample mouse open program                                                            sample mouse open               0002                              =========================                                                            sample mouse open               0003                                                                                                                   sample mouse open               0004                                PRINT (0) (CS);(ET)                                                                sample mouse open               0005                                PRINT (0) (BIOS MOUSE ON)        ! Open BIOS mouse                                 sample mouse open               0006                                PRINT (0) (SHOW MOUSE CURSOR)    ! Make mouse cursor visible                       sample mouse open               0007                                PRINT (0) "BIOS mouse"                                                             sample mouse open               0008                                INPUT (0) ""                                                                       sample mouse open               0009                                PRINT (0) (ENHANCED MOUSE ON)    ! Open enhanced mouse driver                      sample mouse open               0010                                PRINT (0) (SHOW MOUSE CURSOR)    ! Make mouse cursor visible                       sample mouse open               0011                                PRINT (0) "Enhanced mouse"                                                         sample mouse open               0012                                INPUT (0) ""                                                                       sample mouse open               0013                                PRINT (0) (MOUSE ON)             ! Open default mouse driver                       sample mouse open               0014                                PRINT (0) (SHOW MOUSE CURSOR)    ! Make mouse cursor visible                       sample mouse open               0015                                PRINT (0) "Default mouse"                                                          sample mouse open               0016                                INPUT (0) ""                                                                       sample mouse open               0017                                PRINT (0) (MOUSE OFF)            ! Close mouse driver                              sample mouse open               0018                                RUN "QMONITOR"                                                                     sample mouse open               0019                                END                                                                                BTRIEVE gateway                                                     Qantel by writing to the gateway.                                                  CAS Control File                                                       <(FAX Write Config),#HELPMT3>                                                   CEMTEST program                                                     See the <sample program|CEMTEST program>                                           Close the mouse                                                     END                                                                                Comet Electronic Mail                                               <Sort gateway>                                                                     Comet windows                                                       usefile in the utility program source directory.                                   Copyright                                                                                                                                              Creating Custom Lookup Programs                                     .                                                                                  Creating windows                                                    <Sample window program>                                                            DOS Calls Background Discussion                                     <Moving a file's read/write pointer|DOS:LSEEK>                                     DOS Function Calls                                                          GOTO 0000                                                                  DOS:CHDIR                             Change Current DOS Directory     RUN "QMONITOR"                     ! Exit program                               DOS:CLOSE                             Close DOS File Handle         END                                                                                DOS:COPY                              Copy a file                   Also see <DOS Function Calls>.                                                     DOS:CREATE                            Create DOS File               END                                                                                DOS:ERASE                             Erase DOS File                END                                                                                DOS:FIND                              Find a string                 copied, merged, or appended to the target file.                                    DOS:FINDREVERSE                       Find a string -- reverse      The search starts at current position in the file.                                 DOS:GETDATE                           Get DOS Date                                                                                                     DOS:GETTIME                           Get DOS Time                  END                                                                                DOS:LSEEK                             Move File Read/Write Pointer  END                                                                                DOS:MESSAGE                           Send a Message to Another Te  Also see <Send a Message to Another Terminal|DOS:MESSAGE>                          DOS:MESSAGEALL                        Send a Message to All Termin  erased.                                                                            DOS:MKDIR                             Create DOS Subdirectory       END                                                                                DOS:MOVE                              Move a file                   The search starts at current position in the file.                                 DOS:OPEN                              Open DOS File                    the zero-byte write.                                                            DOS:READ                              Read From a DOS File          END                                                                                DOS:RMDIR                             Remove DOS Subdirectory       END                                                                                DOS:WRITE                             Write to a DOS File           END                                                                                DOSFC                                                               <Write to a DOS File|DOS:WRITE>                                                    DOSMS                                                               <Send a Message to Another Terminal|DOS:MESSAGE>                                   DOSRW                                                               <Change the current DOS subdirectory|DOS:CHDIR>                                    Deleting windows                                                    <(Window Title Foreground),#HELPMT3>                                               Detecting mouse clicks                                              Also see <Show/hide the mouse cursor>.                                             Dynamic Driver Libraries                                               PROCESS:                           ! data value                                 Enhanced Character Set                                                      lookup program (accessible via the NOVA keys).                             Fax demo program                                                                 (i.e., queue for "immediate" transmission)                            Fax driver                                                             <(Radio Button On),#HELPMT3>                                                    Fax mnemonics                                                       fax mnemonics are implemented.                                                     HOME                                                                First on-line edition September 1996.                                              Help Messages and Linking Method                                       IF FKEY$ = "003" THEN ...                                                       MTB Applications                                                    <Index|INDEX,#HELPMTB>                                                             Mouse demo program                                                     as radio buttons and check boxes.                                               Mouse driver                                                        End                                                                                Mouse sample programs                                               END                                                                                NOVA                                  The NOVA System               USE "UFCEMEXE"         ! INCLUDES THE SECOND USEFILE                               Open the mouse                                                      <(Enhanced Characters Off),#HELPMT3>                                               Polling the mouse                                                   from the input buffer.                                                             Pseudo DOS Functions                                                END                                                                                Pseudocode for in-memory sort                                       gateway device which has been previously opened in your program.                   Pseudocode for sort/merge                                              first record.                                                                   QTerm gateway                                                               renaming these work files as appropriate.                                  Reading the mouse                                                   See <Reading the mouse> or <Polling the mouse>.                                    Reading the mouse pseudocode                                        Also see the <Mouse demo program>.                                                 Regular cursor display                                              Also see <Regular cursor display>.                                                 Sample window program                                               INPUT (0) MEMSPACE                    ! Remaining window memory                    Scan Codes                                                          END                                                                                Setting window colors                                               PRINT (0) (Delete Window)                                                          Show/hide the mouse cursor                                             PRINT (0) <(Close mouse),#HELPMT3>                                              Sort ascending in memory                                               Systems.                                                                        Sort ascending sort/merge                                           gateway device which has been previously opened in your program.                   Sort begin sort/merge                                               gateway device which has been previously opened in your program.                   Sort descending in memory                                           gateway device which has been previously opened in your program.                   Sort descending sort/merge                                          gateway device which has been previously opened in your program.                   Sort gateway                                                                          FTR.                                                             Sort move pointer to top                                            gateway device which has been previously opened in your program.                   Sort record length                                                  gateway device which has been previously opened in your program.                   Using the Automatic Help Feature                                    <Help Messages and Linking Methods>                                                Window memory                                                       Entry = black field (0) with black characters (0)                                  Windows title line                                                  left corner) to column 70, row 20 (the lower right corner).                        Working with the #NOVA Control F                                       repeatedly.                                                                     sample mouse open                                                   Also see <Show/hide the mouse cursor>.                                             